The spec says: `The origin node MUST NOT set both the optional and
mandatory bits`. and so this is why we have the SafeSet method which
prevents us from accidentally setting both optional and required bits
for any of our own feature bits. But the spec then also says `if both
the optional and the mandatory feature bits in a pair are set, the
feature should be treated as mandatory.` which means that when we read
the feature vectors of our peers or from a payment request, we should be
a bit less strict and not error out. We should just set both bits which
will result in "IsRequired" returning true.
Update the `TestExtractIntentFromSendRequest` test to show the new
behaviour.
Here we add a test case to TestExtractIntentFromSendRequest which shows
that an error is returned if the destination feature bit vector of a
payment request contains both the required and optional bits for a given
feature. This will be updated in an upcoming commit to be less strict.
Which lets us run `TestNodeIsPublic` against our SQL DB backends.
Note that we need to tweak the tests a little bit so that
`AddLightningNode` for the same node is always called with a newer
LastUpdate time else it will fail the SQL constraint that only allows
the upsert if the update is newer than the persisted one.
Here we implement the SQLStore methods:
- MarkEdgeZombie
- MarkEdgeLive
- IsZombieEdge
- NumZombies
These will be tested in the next commit as one more method
implementation is required.
Note that this table will only contain entries for channels that we have
deleted from the `channels` table which is why we cannot use foreign
keys. Similarly, we may no longer have node entries for the nodes in the
table.
We already set `nobootstrap` in the default node flags for itest nodes,
so we can remove this check now. This will allow us to later test
bootstrapping in an itest. NOTE that with this change, any
signet/simnet/regtest network users will now need to explicitly add the
`--nobootstrap` flag if they want to prevent automatic bootstrapping.
This warning is added to the release notes later on.
Use an additional -bind flag instead of -port to specify the default p2p port.
Flag -port sets the default port number that will be used for any -bind or
-whitebind that does not explicitly specify a port. So if we have the p2p
port set in -port and the tor p2p port set in a single -bind, bitcoind binds
only one port - the tor p2p port. And the default p2p port remained not bound!