mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
e3: more mergeFiles tests, refcnt for LocalityIndex (#6765)
This commit is contained in:
parent
f9ab76f9ef
commit
dede1a2c9e
@ -58,8 +58,6 @@ import (
|
||||
"github.com/ledgerwatch/erigon/turbo/snapshotsync"
|
||||
)
|
||||
|
||||
const ASSERT = false
|
||||
|
||||
var (
|
||||
action = flag.String("action", "", "action to execute")
|
||||
cpuprofile = flag.String("cpuprofile", "", "write cpu profile `file`")
|
||||
|
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module github.com/ledgerwatch/erigon
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230201215037-1a14cfd7e764
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230203104538-738655e9e695
|
||||
github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230120022649-cd9409a200da
|
||||
github.com/ledgerwatch/log/v3 v3.7.0
|
||||
github.com/ledgerwatch/secp256k1 v1.0.0
|
||||
|
4
go.sum
4
go.sum
@ -555,8 +555,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758 h1:0D5M2HQSGD3PYPwICLl+/9oulQauOuETfgFvhBDffs0=
|
||||
github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c=
|
||||
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230201215037-1a14cfd7e764 h1:e5IZ5zW9REXLgLIGbzkJYtoA5g4AmqgxQGtkgjZZudk=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230201215037-1a14cfd7e764/go.mod h1:cJSGIvVSkCmqdwOjskY+WnugOz5NVFs0EllQ4UN+rr4=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230203104538-738655e9e695 h1:y/Ct3sY3GK3fK8dR/moLhQpoNKuOqcvcaMbE30qLx4I=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230203104538-738655e9e695/go.mod h1:cJSGIvVSkCmqdwOjskY+WnugOz5NVFs0EllQ4UN+rr4=
|
||||
github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230120022649-cd9409a200da h1:lQQBOHzAUThkymfXJj/m07vAjyMx9XoMMy3OomaeOrA=
|
||||
github.com/ledgerwatch/erigon-snapshot v1.1.1-0.20230120022649-cd9409a200da/go.mod h1:3AuPxZc85jkehh/HA9h8gabv5MSi3kb/ddtzBsTVJFo=
|
||||
github.com/ledgerwatch/log/v3 v3.7.0 h1:aFPEZdwZx4jzA3+/Pf8wNDN5tCI0cIolq/kfvgcM+og=
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
"time"
|
||||
|
||||
common2 "github.com/ledgerwatch/erigon-lib/common"
|
||||
"github.com/ledgerwatch/erigon-lib/common/assert"
|
||||
"github.com/ledgerwatch/erigon-lib/common/datadir"
|
||||
"github.com/ledgerwatch/erigon-lib/common/dbg"
|
||||
"github.com/ledgerwatch/erigon-lib/common/hexutility"
|
||||
@ -22,8 +23,6 @@ import (
|
||||
"github.com/ledgerwatch/erigon/rlp"
|
||||
)
|
||||
|
||||
const ASSERT = false
|
||||
|
||||
var ErrTxsBeginEndNoMigration = fmt.Errorf("in this Erigon version DB format was changed: added additional first/last system-txs to blocks. There is no DB migration for this change. Please re-sync or switch to earlier version")
|
||||
|
||||
var txsBeginEnd = Migration{
|
||||
@ -76,7 +75,7 @@ var txsBeginEnd = Migration{
|
||||
}
|
||||
|
||||
var oldBlock *types.Body
|
||||
if ASSERT {
|
||||
if assert.Enable {
|
||||
oldBlock = readCanonicalBodyWithTransactionsDeprecated(tx, canonicalHash, blockNum)
|
||||
}
|
||||
|
||||
@ -113,7 +112,7 @@ var txsBeginEnd = Migration{
|
||||
return err
|
||||
}
|
||||
|
||||
if ASSERT {
|
||||
if assert.Enable {
|
||||
newBlock, baseTxId, txAmount := rawdb.ReadBody(tx, canonicalHash, blockNum)
|
||||
newBlock.Transactions, err = rawdb.CanonicalTransactions(tx, baseTxId, txAmount)
|
||||
for i, oldTx := range oldBlock.Transactions {
|
||||
|
Loading…
Reference in New Issue
Block a user