Setting the "LowPower" mode on the main DownloadManager class will
cause it to halt all network activity and jobs will die.
You can revive it by changing it to NormalPower and optionally calling
the start() method to restart all jobs.
The idea of binding to interfaces now will take into account the
interfaces maybe becoming available only after the server started.
If your server starts at machine boot, it is a 50/50 chance that the
network interfaces are already fully configured and have received
addresses. In case of dhcp, more often than not this means that your
server will not be listening at the main interface because it wasn't up
yet.
This new api allows the server to give a function to register a new
interface and we have some linux specific code that will notice changes
in the interfaces and we'll allow the app to bind to it a moment or two
after that.
We always need two random peers to download a certain merkle block, to
avoid the withholding attack.
It occurred to me that there is no need to do them one after the other,
they can both run in parallel without issues. Saving time.
This is a combination of 5 commits.
Improve AddressMonitorService
Changed double spend notifications to new format & include cashtoken data
Updated AddressMonitorService response for txs found in the mempool.
Removed duplicate BitcoinScriptHashed tags
AddressMonitorService update
This makes minor renames and cleanups.
We merge the 5 different cashtoken booleans into one, making
usage and server-code simpler.
And probably in real use not actually causing bigger messages.
Also use the more appropriate lock_guard for mutex usage.
And I noticed that in the NotificationCenter we assumed a callback would
be able to unregister itself, which requires a recursive mutex. As such
the mutex has now been elevated to be such.
Negative ban scores are a bit annoying since when a user bans the node
it gives a 1000 point punishment, assuming that this will make the ban
score be above the 1000 point limit which implies banned.
This is an abstract class that the application using this library needs
to subclass. Ownership and lifetime don't change, it still lies with the
app using the library and they still need to add and remove it from the
connectionManager, but this makes it much more stable for multi-
threading environments and avoids issues on misuse.
Adjusting the fee actually changes the transaction data and as such we
need to redo all the signatures.
This update fixes the method-structure to do this properly.
The recent features of fee adjusting an output and adding a token to an
output now also work when the transaction is sorted for bip69 style
anonimizing.
This adds the feature to take a transaction that has no or very low fee
and telling the TransactionBuilder class to use a certain output to
pay needed fees from.
On the call to createTransaction money will be taken from the specified
output based on the specified fee-per-byte (default 1sat/byte).
The BufferPool::writeHex() method takes a string-pointer, we add an int
max-number-of-chars to be parsed on that string.
This allows us to not just stop at the first non-hex char, but also
after a set number of characters.
This effectively allows us to use non-zere-terminated strings as
argument too.
This affects both the BlockChain/GetBlockHeaderReply and the
BlockChain/GetBlockVerboseReply calls.
The field with id 75 was confusingly called 'bits', but this is really
the blocktarget from the blockheaders. We renamed this.
This field is a int-encoded-floating point value and as such it makes no
sense to send it as a simple int. It is now a byte-array.
Notice that the documentation always listed it as a byte-array so we
actually fixed the implementation to follow the spec.
Rename variable to talk about message instead of package (which probably
was meant to be packet anyway).
Make log message of exception we caught a little more useful.
The CashToken bitfield now is more usable without magic numbers and we
have a bunch of documentation about what the fields mean.
Also remove unused variable.