Skip to content

Commit

Permalink
core, internal: add back web extend methods and missing WriteTransfer…
Browse files Browse the repository at this point in the history
…Logs
  • Loading branch information
CaraWang committed Sep 19, 2024
1 parent 6cb4bec commit 9e46b4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -1809,8 +1809,10 @@ func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types.
rawdb.WriteBlobSidecars(blockBatch, block.Hash(), block.NumberU64(), block.Sidecars())
}
if bc.db.StateStore() != nil {
rawdb.WriteTransferLogs(bc.db.StateStore(), block.Hash(), block.NumberU64(), state.TransferLogs())
rawdb.WritePreimages(bc.db.StateStore(), state.Preimages())
} else {
rawdb.WriteTransferLogs(blockBatch, block.Hash(), block.NumberU64(), state.TransferLogs())
rawdb.WritePreimages(blockBatch, state.Preimages())
}
if err := blockBatch.Write(); err != nil {
Expand Down
6 changes: 6 additions & 0 deletions internal/web3ext/web3ext.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,12 @@ web3._extend({
params: 1,
inputFormatter: [null],
}),
new web3._extend.Method({
name: 'getTransferLogs',
call: 'debug_getTransferLogs',
params: 1,
inputFormatter: [null],
}),
new web3._extend.Method({
name: 'getBlockReceipts',
call: 'debug_getBlockReceipts',
Expand Down

0 comments on commit 9e46b4d

Please sign in to comment.