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
|
// Mutate the journal in disk, it should be regarded as invalid
|
||||||
blob := rawdb.ReadTrieJournal(tester.db.diskdb)
|
blob := rawdb.ReadTrieJournal(tester.db.diskdb)
|
||||||
blob[0] = 0xa
|
blob[0] = 0x1
|
||||||
rawdb.WriteTrieJournal(tester.db.diskdb, blob)
|
rawdb.WriteTrieJournal(tester.db.diskdb, blob)
|
||||||
|
|
||||||
// Verify states, all not-yet-written states should be discarded
|
// Verify states, all not-yet-written states should be discarded
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,7 @@ var (
|
||||||
// Changelog:
|
// Changelog:
|
||||||
//
|
//
|
||||||
// - Version 0: initial version
|
// - Version 0: initial version
|
||||||
// - Version 1: storage.Incomplete field is removed
|
const journalVersion uint64 = 0
|
||||||
const journalVersion uint64 = 1
|
|
||||||
|
|
||||||
// journalNode represents a trie node persisted in the journal.
|
// journalNode represents a trie node persisted in the journal.
|
||||||
type journalNode struct {
|
type journalNode struct {
|
||||||
|
|
@ -70,6 +69,7 @@ type journalAccounts struct {
|
||||||
|
|
||||||
// journalStorage represents a list of storage slots belong to an account.
|
// journalStorage represents a list of storage slots belong to an account.
|
||||||
type journalStorage struct {
|
type journalStorage struct {
|
||||||
|
Incomplete bool // Deprecated, keep it for backward compatibility
|
||||||
Account common.Address
|
Account common.Address
|
||||||
Hashes []common.Hash
|
Hashes []common.Hash
|
||||||
Slots [][]byte
|
Slots [][]byte
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue