unit test passing locally
This commit is contained in:
parent
7be0033d12
commit
d322709288
@ -71,7 +71,7 @@ func (sdi *StateDiffIndexer) PushBlock(block *types.Block, receipts types.Receip
|
||||
traceMsg := fmt.Sprintf("indexer stats for statediff at %d with hash %s:\r\n", height, blockHashStr)
|
||||
transactions := block.Transactions()
|
||||
// Derive any missing fields
|
||||
if err := receipts.DeriveFields(sdi.chainConfig, blockHash, height, transactions); err != nil {
|
||||
if err := receipts.DeriveFields(sdi.chainConfig, blockHash, height, block.BaseFee(), transactions); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
@ -140,7 +140,7 @@ func (sdi *StateDiffIndexer) PushBlock(block *types.Block, receipts types.Receip
|
||||
traceMsg := fmt.Sprintf("indexer stats for statediff at %d with hash %s:\r\n", height, blockHashStr)
|
||||
transactions := block.Transactions()
|
||||
// Derive any missing fields
|
||||
if err := receipts.DeriveFields(sdi.chainConfig, blockHash, height, transactions); err != nil {
|
||||
if err := receipts.DeriveFields(sdi.chainConfig, blockHash, height, block.BaseFee(), transactions); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ func (sdi *StateDiffIndexer) PushBlock(block *types.Block, receipts types.Receip
|
||||
traceMsg := fmt.Sprintf("indexer stats for statediff at %d with hash %s:\r\n", height, blockHashStr)
|
||||
transactions := block.Transactions()
|
||||
// Derive any missing fields
|
||||
if err := receipts.DeriveFields(sdi.chainConfig, blockHash, height, transactions); err != nil {
|
||||
if err := receipts.DeriveFields(sdi.chainConfig, blockHash, height, block.BaseFee(), transactions); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ var writeLoopParams = ParamsWithMutex{
|
||||
|
||||
type blockChain interface {
|
||||
SubscribeChainEvent(ch chan<- core.ChainEvent) event.Subscription
|
||||
CurrentBlock() *types.Block
|
||||
CurrentBlock() *types.Header
|
||||
GetBlockByHash(hash common.Hash) *types.Block
|
||||
GetBlockByNumber(number uint64) *types.Block
|
||||
GetReceiptsByHash(hash common.Hash) types.Receipts
|
||||
@ -943,7 +943,7 @@ func (sds *Service) WatchAddress(operation types2.OperationType, args []types2.W
|
||||
defer writeLoopParams.Unlock()
|
||||
|
||||
// get the current block number
|
||||
currentBlockNumber := sds.BlockChain.CurrentBlock().Number()
|
||||
currentBlockNumber := sds.BlockChain.CurrentBlock().Number
|
||||
|
||||
switch operation {
|
||||
case types2.Add:
|
||||
|
@ -134,7 +134,7 @@ func (backend *Backend) CurrentHeader() *types.Header {
|
||||
panic("not implemented") // TODO: Implement
|
||||
}
|
||||
|
||||
func (backend *Backend) CurrentBlock() *types.Block {
|
||||
func (backend *Backend) CurrentBlock() *types.Header {
|
||||
panic("not implemented") // TODO: Implement
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ func (backend *Backend) GetTd(ctx context.Context, hash common.Hash) *big.Int {
|
||||
panic("not implemented") // TODO: Implement
|
||||
}
|
||||
|
||||
func (backend *Backend) GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, header *types.Header, vmConfig *vm.Config) (*vm.EVM, func() error, error) {
|
||||
func (backend *Backend) GetEVM(ctx context.Context, msg *core.Message, state *state.StateDB, header *types.Header, vmConfig *vm.Config) (*vm.EVM, func() error, error) {
|
||||
panic("not implemented") // TODO: Implement
|
||||
}
|
||||
|
||||
|
@ -134,8 +134,8 @@ func (bc *BlockChain) SetCurrentBlock(block *types.Block) {
|
||||
}
|
||||
|
||||
// CurrentBlock mock method
|
||||
func (bc *BlockChain) CurrentBlock() *types.Block {
|
||||
return bc.currentBlock
|
||||
func (bc *BlockChain) CurrentBlock() *types.Header {
|
||||
return bc.currentBlock.Header()
|
||||
}
|
||||
|
||||
func (bc *BlockChain) SetTd(hash common.Hash, blockNum uint64, td *big.Int) {
|
||||
|
@ -350,7 +350,7 @@ func (sds *MockStateDiffService) WatchAddress(operation sdtypes.OperationType, a
|
||||
defer sds.writeLoopParams.Unlock()
|
||||
|
||||
// get the current block number
|
||||
currentBlockNumber := sds.BlockChain.CurrentBlock().Number()
|
||||
currentBlockNumber := sds.BlockChain.CurrentBlock().Number
|
||||
|
||||
switch operation {
|
||||
case sdtypes.Add:
|
||||
|
Loading…
Reference in New Issue
Block a user