forked from cerc-io/plugeth
Merge Geth v1.10.21 as well as update to Plugeth-Utils v0.0.18
This commit is contained in:
@@ -208,7 +208,7 @@ func NewDatabaseWithFreezer(db ethdb.KeyValueStore, freezer string, namespace st
|
||||
// are contiguous, otherwise we might end up with a non-functional freezer.
|
||||
if kvhash, _ := db.Get(headerHashKey(frozen)); len(kvhash) == 0 {
|
||||
// Subsequent header after the freezer limit is missing from the database.
|
||||
// Reject startup is the database has a more recent head.
|
||||
// Reject startup if the database has a more recent head.
|
||||
if *ReadHeaderNumber(db, ReadHeadHeaderHash(db)) > frozen-1 {
|
||||
return nil, fmt.Errorf("gap (#%d) in the chain between ancients and leveldb", frozen)
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ func TestFreezerReadonlyValidate(t *testing.T) {
|
||||
|
||||
// Re-openening as readonly should fail when validating
|
||||
// table lengths.
|
||||
f, err = NewFreezer(dir, "", true, 2049, tables)
|
||||
_, err = NewFreezer(dir, "", true, 2049, tables)
|
||||
if err == nil {
|
||||
t.Fatal("readonly freezer should fail with differing table lengths")
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ func TestCopyFrom(t *testing.T) {
|
||||
{"foo", "bar", 8, true},
|
||||
}
|
||||
for _, c := range cases {
|
||||
os.WriteFile(c.src, content, 0644)
|
||||
os.WriteFile(c.src, content, 0600)
|
||||
|
||||
if err := copyFrom(c.src, c.dest, c.offset, func(f *os.File) error {
|
||||
if !c.writePrefix {
|
||||
|
||||
Reference in New Issue
Block a user