mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
triedb/pathdb: restore pathdb journal version
This commit is contained in:
parent
aadcb88675
commit
a82472e24c
2 changed files with 6 additions and 6 deletions
|
|
@ -543,7 +543,7 @@ func TestCorruptedJournal(t *testing.T) {
|
|||
|
||||
// Mutate the journal in disk, it should be regarded as invalid
|
||||
blob := rawdb.ReadTrieJournal(tester.db.diskdb)
|
||||
blob[0] = 0xa
|
||||
blob[0] = 0x1
|
||||
rawdb.WriteTrieJournal(tester.db.diskdb, blob)
|
||||
|
||||
// Verify states, all not-yet-written states should be discarded
|
||||
|
|
|
|||
|
|
@ -46,8 +46,7 @@ var (
|
|||
// Changelog:
|
||||
//
|
||||
// - Version 0: initial version
|
||||
// - Version 1: storage.Incomplete field is removed
|
||||
const journalVersion uint64 = 1
|
||||
const journalVersion uint64 = 0
|
||||
|
||||
// journalNode represents a trie node persisted in the journal.
|
||||
type journalNode struct {
|
||||
|
|
@ -70,6 +69,7 @@ type journalAccounts struct {
|
|||
|
||||
// journalStorage represents a list of storage slots belong to an account.
|
||||
type journalStorage struct {
|
||||
Incomplete bool // Deprecated, keep it for backward compatibility
|
||||
Account common.Address
|
||||
Hashes []common.Hash
|
||||
Slots [][]byte
|
||||
|
|
|
|||
Loading…
Reference in a new issue