Skip to content

Commit ed1a10a

Browse files
committed
finish API
1 parent 768da69 commit ed1a10a

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

eth/api.go

+3
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,8 @@ func (api *ScrollAPI) GetSkippedTransactionHashes(ctx context.Context, from uint
762762
return hashes, nil
763763
}
764764

765+
// ResetSkippedTransactionsTraces reset the traces for skipped txs stored in db, and returns the list of reset transaction hashes.
766+
// The skipped txs to reset are specified by the two indices provided (inclusive).
765767
func (api *ScrollAPI) ResetSkippedTransactionsTraces(ctx context.Context, from uint64, to uint64) ([]common.Hash, error) {
766768
hashes, err := api.GetSkippedTransactionHashes(ctx, from, to)
767769
if err != nil {
@@ -777,6 +779,7 @@ func (api *ScrollAPI) ResetSkippedTransactionsTraces(ctx context.Context, from u
777779
return hashes, nil
778780
}
779781

782+
// ResetSkippedTransactionTracesByHash reset a specified skipped tx's traces stored in db.
780783
func (api *ScrollAPI) ResetSkippedTransactionTracesByHash(ctx context.Context, hash common.Hash) error {
781784
rawdb.ResetSkippedTransactionTracesByHash(api.eth.ChainDb(), hash)
782785
return nil

internal/web3ext/web3ext.go

+10
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,16 @@ web3._extend({
897897
call: 'scroll_getSkippedTransactionHashes',
898898
params: 2
899899
}),
900+
new web3._extend.Method({
901+
name: 'resetSkippedTransactionsTraces',
902+
call: 'scroll_resetSkippedTransactionsTraces',
903+
params: 2
904+
}),
905+
new web3._extend.Method({
906+
name: 'resetSkippedTransactionTracesByHash',
907+
call: 'scroll_resetSkippedTransactionTracesByHash',
908+
params: 1
909+
}),
900910
],
901911
properties:
902912
[

0 commit comments

Comments
 (0)