server: allow to create incremental dumps

Anything not starting from 0 is incremental by definition.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
Roman Khimov 2023-06-29 11:41:04 +03:00 committed by Anna Shaleva
parent 4383832aa2
commit b560475e67

View file

@ -198,6 +198,9 @@ func dumpDB(ctx *cli.Context) error {
if count == 0 { if count == 0 {
count = chainCount - start count = chainCount - start
} }
if start != 0 {
writer.WriteU32LE(start)
}
writer.WriteU32LE(count) writer.WriteU32LE(count)
err = chaindump.Dump(chain, writer, start, count) err = chaindump.Dump(chain, writer, start, count)
if err != nil { if err != nil {