Geth 1.13 (Deneb/Cancun) update #264
@ -349,8 +349,15 @@ func (b *Backend) BlockByHash(ctx context.Context, hash common.Hash) (*types.Blo
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Placeholder for withdrawal processing (TODO)
|
||||||
|
var withdrawals types.Withdrawals
|
||||||
|
if b.Config.ChainConfig.IsShanghai(header.Number, header.Time) {
|
||||||
|
// All blocks after Shanghai must include a withdrawals root.
|
||||||
|
withdrawals = make(types.Withdrawals, 0)
|
||||||
|
}
|
||||||
|
|
||||||
// Compose everything together into a complete block
|
// Compose everything together into a complete block
|
||||||
return types.NewBlock(header, transactions, uncles, receipts, trie.NewEmpty(nil)), err
|
return types.NewBlockWithWithdrawals(header, transactions, uncles, receipts, withdrawals, trie.NewEmpty(nil)), err
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetHeaderByBlockHash retrieves header for a provided block hash
|
// GetHeaderByBlockHash retrieves header for a provided block hash
|
||||||
|
Loading…
Reference in New Issue
Block a user