fix some lint issues

This commit is contained in:
Jared Wasinger 2025-10-28 12:35:00 +08:00
parent b44c182cbd
commit b24306eacc
5 changed files with 17 additions and 5 deletions

View file

@ -316,11 +316,11 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
return nil, nil, nil, NewError(ErrorEVM, fmt.Errorf("could not parse requests logs: %v", err))
}
// EIP-7002
if _, _, err := core.ProcessWithdrawalQueue(&requests, evm); err != nil {
if err := core.ProcessWithdrawalQueue(&requests, evm); err != nil {
return nil, nil, nil, NewError(ErrorEVM, fmt.Errorf("could not process withdrawal requests: %v", err))
}
// EIP-7251
if _, _, err := core.ProcessConsolidationQueue(&requests, evm); err != nil {
if err := core.ProcessConsolidationQueue(&requests, evm); err != nil {
return nil, nil, nil, NewError(ErrorEVM, fmt.Errorf("could not process consolidation requests: %v", err))
}
}

View file

@ -165,7 +165,7 @@ func testBlockChainImport(chain types.Blocks, blockchain *BlockChain) error {
blockchain.reportBlock(block, res, err)
return err
}
err = blockchain.validator.ValidateState(block, statedb, res, false)
err = blockchain.validator.ValidateState(block, statedb, res, true, false)
if err != nil {
blockchain.reportBlock(block, res, err)
return err

View file

@ -38,7 +38,7 @@ func equalBALs(a *BlockAccessList, b *BlockAccessList) bool {
func makeTestConstructionBAL() *AccessListBuilder {
return &AccessListBuilder{
map[common.Address]*ConstructionAccountAccesses{
FinalizedAccesses: map[common.Address]*ConstructionAccountAccesses{
common.BytesToAddress([]byte{0xff, 0xff}): {
StorageWrites: map[common.Hash]map[uint16]common.Hash{
common.BytesToHash([]byte{0x01}): {

View file

@ -312,6 +312,18 @@ func (d *dummyChain) Config() *params.ChainConfig {
return nil
}
func (d *dummyChain) CurrentHeader() *types.Header {
return nil
}
func (d *dummyChain) GetHeaderByNumber(n uint64) *types.Header {
return d.GetHeader(common.Hash{}, n)
}
func (d *dummyChain) GetHeaderByHash(h common.Hash) *types.Header {
return nil
}
// TestBlockhash tests the blockhash operation. It's a bit special, since it internally
// requires access to a chain reader.
func TestBlockhash(t *testing.T) {

View file

@ -341,7 +341,7 @@ func XTestDelivery(t *testing.T) {
uncleHashes[i] = types.CalcUncleHash(uncles)
}
time.Sleep(100 * time.Millisecond)
_, err := q.DeliverBodies(peer.id, txset, txsHashes, uncleset, uncleHashes, nil, nil)
_, err := q.DeliverBodies(peer.id, txset, txsHashes, uncleset, uncleHashes, nil, nil, nil, nil)
if err != nil {
fmt.Printf("delivered %d bodies %v\n", len(txset), err)
}