Add tracker interface and tests #3

Merged
roysc merged 7 commits from tracker-interface into main 2023-09-26 11:34:42 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit ef7227a0a1 - Show all commits

2
go.mod
View File

@ -57,7 +57,7 @@ require (
)
replace (
github.com/cerc-io/eth-testing => git.vdb.to/cerc-io/eth-testing v0.3.1-0.20230925181540-2ea71042e7e0
github.com/cerc-io/eth-testing => git.vdb.to/cerc-io/eth-testing v0.3.1
// Not strictly necessary, but tells go what dependency versions should be
github.com/ethereum/go-ethereum => git.vdb.to/cerc-io/plugeth v0.0.0-20230808125822-691dc334fab1
)

View File

@ -5,16 +5,16 @@
// Example usage:
//
// tr := tracker.New("recovery.txt", 100)
// // ensure the tracker is closed and saves its state
// // Ensure the tracker is closed and saves its state
// defer tr.CloseAndSave()
//
// // iterate over the trie, from one or multiple threads
// // Iterate over the trie, from one or multiple threads
// it := tr.Tracked(tree.NodeIterator(nil))
// for it.Next(true) {
// // ... do work that could fail or be interrupted
// }
//
// // later, restore the iterators
// // Later, restore the iterators
// tr := tracker.New("recovery.txt", 100)
// defer tr.CloseAndSave()
//