When a block is disconnected due to a reorg, DisconnectBlockAtHeight
is called for the block height. Prior to this patch, it would delete
every SCID in the graph with a block height greater than the
disconnected height. This meant that a reorg would delete every
zero-conf channel edge from the graph. The fix simply iterates up
until the StartingAlias and deletes every SCID between the
disconnected height and the StartingAlias height.
adds the functionality in the lncli walletkit to sign and verify a
message with a single address. Signing works only with lnd default
wallet account. Verifying signature on messages with external addresses
is also supported.
In this commit, all the sql, non-postgres-specific, code is moved out of
the postgres package and into a new sqlbase package. This will make it
more easily reusable for future sql integrations.
In this commit, changes are made to the `kvdb/postgres` package so that
all all the non-postgres-specific code is generalised to be applicable
for all sql code. A follow up commit will move all the general sql code
into its own package.
Due to the update of the kvdb package to go1.18, the `// +build`
directives are no longer required. They are removed in this commit in
order to simplify upcoming commits. Along the way, a few typos are fixed
and an unused struct is removed.
Bump the go version to go1.18 so that we can get rid of the '// +build'
comments in the upcoming commits where some of the '//go:build'
comments will become too complex to write as '// +build' comments.
The only way to know if an invoice is AMP, Keysend, etc is to look at
its shape/characteristics. This commit adds a couple of helper functions
to encapsulate the logic of these checks.
If all these types cannot intersect: an invoice cannot be AMP and
Keysend or Keysend and Bolt12, etc it could be useful to add an extra
field to store this information instead of relying on checking how the
invoice looks like.
This commit changes how a node's state is created during startup. When
it already has states, only its internal states are reset since these
info are only useful for the finished test. The name `InitRPCClients` is
changed to `Initialize` to reflect the fact that it's more than
initializing RPC clients.