internal/ethapi/api_test.go — Version Comparison
|
v1.16.8 |
v1.17.3 |
| Branch |
etc/v1.16.8-full-node |
etc/v1.17.3-full-node |
| Delta |
+6 -0 |
+6 -0 |
ETC delta on v1.16.8 (+6 -0)
diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go
index aaa002b5e..1924eb106 100644
--- a/internal/ethapi/api_test.go
+++ b/internal/ethapi/api_test.go
@@ -590,6 +590,12 @@ func (b testBackend) GetReceipts(ctx context.Context, hash common.Hash) (types.R
receipts := rawdb.ReadReceipts(b.db, hash, header.Number.Uint64(), header.Time, b.chain.Config())
return receipts, nil
}
+func (b testBackend) GetTd(ctx context.Context, hash common.Hash) *big.Int {
+ if b.pending != nil && hash == b.pending.Hash() {
+ return nil
+ }
+ return big.NewInt(1)
+}
func (b testBackend) GetEVM(ctx context.Context, state *state.StateDB, header *types.Header, vmConfig *vm.Config, blockContext *vm.BlockContext) *vm.EVM {
if vmConfig == nil {
vmConfig = b.chain.GetVMConfig()
ETC delta on v1.17.3 (+6 -0)
diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go
index 161d97b4e..b7d9ce23a 100644
--- a/internal/ethapi/api_test.go
+++ b/internal/ethapi/api_test.go
@@ -596,6 +596,12 @@ func (b testBackend) GetReceipts(ctx context.Context, hash common.Hash) (types.R
receipts := rawdb.ReadReceipts(b.db, hash, header.Number.Uint64(), header.Time, b.chain.Config())
return receipts, nil
}
+func (b testBackend) GetTd(ctx context.Context, hash common.Hash) *big.Int {
+ if b.pending != nil && hash == b.pending.Hash() {
+ return nil
+ }
+ return big.NewInt(1)
+}
func (b testBackend) GetEVM(ctx context.Context, state *state.StateDB, header *types.Header, vmConfig *vm.Config, blockContext *vm.BlockContext) *vm.EVM {
if vmConfig == nil {
vmConfig = b.chain.GetVMConfig()
← Back to Version Comparison