Merge Geth v1.10.21 as well as update to Plugeth-Utils v0.0.18

This commit is contained in:
philip-morlier
2022-07-27 10:38:42 -07:00
380 changed files with 6936 additions and 6262 deletions
+1 -1
View File
@@ -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)
}
+1 -1
View File
@@ -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")
}
+1 -1
View File
@@ -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 {