repaircfilters

command
v5.0.0-...-15a67d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2024 License: ISC Imports: 19 Imported by: 0

README

repaircfilters

repaircfilters is a tool that can be used to repair a wallet's pre-DCP0005 filters by importing known-good cfilters into the wallet's database.

In order to run it needs to be provided with a binary file filled with the pre-DCP0005 cfilter data in a specific format: for each block height before the activation height of DCP0005 in the given network the binary file must have a record with the lenght of the filter plus the filter itself.

That is:

^ len ^      format       ^              field                   ^
|   2 | Big-endian uint16 | Length of the following cfilter data |
|   n | bytes             | Cfilter data for a block             |

One to generate a file in that format is this: https://github.com/matheusd/cfilterv2hashes

Building

Requires go 1.13.

Usage

Invoke the tool passing the CLI arguments so that it can connect to the wallet and import the provided cfilter data.

$ go run . -c localhost:19110 -u USER -p PASSWORD --cafile ~/.dcrwallet/rpc.cert
--cfiltersfile testnet-data.bin

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL