core/types, params: add blob transaction type, RLP encoded for now (#27049)
* core/types, params: add blob transaction type, RLP encoded for now * all: integrate Cancun (and timestamp based forks) into MakeSigner * core/types: fix 2 back-and-forth type refactors * core: fix review comment * core/types: swap blob tx type id to 0x03
This commit is contained in:
+4
-3
@@ -131,9 +131,10 @@ func TestOdrGetReceiptsLes2(t *testing.T) { testChainOdr(t, 1, odrGetReceipts) }
|
||||
func odrGetReceipts(ctx context.Context, db ethdb.Database, bc *core.BlockChain, lc *LightChain, bhash common.Hash) ([]byte, error) {
|
||||
var receipts types.Receipts
|
||||
if bc != nil {
|
||||
number := rawdb.ReadHeaderNumber(db, bhash)
|
||||
if number != nil {
|
||||
receipts = rawdb.ReadReceipts(db, bhash, *number, bc.Config())
|
||||
if number := rawdb.ReadHeaderNumber(db, bhash); number != nil {
|
||||
if header := rawdb.ReadHeader(db, bhash, *number); header != nil {
|
||||
receipts = rawdb.ReadReceipts(db, bhash, *number, header.Time, bc.Config())
|
||||
}
|
||||
}
|
||||
} else {
|
||||
number := rawdb.ReadHeaderNumber(db, bhash)
|
||||
|
||||
+1
-1
@@ -175,7 +175,7 @@ func GetBlockReceipts(ctx context.Context, odr OdrBackend, hash common.Hash, num
|
||||
genesis := rawdb.ReadCanonicalHash(odr.Database(), 0)
|
||||
config := rawdb.ReadChainConfig(odr.Database(), genesis)
|
||||
|
||||
if err := receipts.DeriveFields(config, block.Hash(), block.NumberU64(), block.BaseFee(), block.Transactions()); err != nil {
|
||||
if err := receipts.DeriveFields(config, block.Hash(), block.NumberU64(), block.Time(), block.BaseFee(), block.Transactions()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
rawdb.WriteReceipts(odr.Database(), hash, number, receipts)
|
||||
|
||||
Reference in New Issue
Block a user