CMake details for finding boost have been shipped for years inside
of boost, this makes cmake use that upsteam info to configure boost
and avoids problems when a newer boost than cmake is found.
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 moves the class CBlockFileInfo from main.h to the BlocksDB_p.h
file as that is the class where it is mostly used.
There is a global variable in main.{h|cpp} left but since that is
strictly limited to main.cpp it made no sense to details slip out
via the massively overused main.h
The log handler sometimes gets handed log strings that have a trailing
linefeed. Which is generated inside of the lib-event code.
To avoid these log-lines taking multiple lines in our own log, this code
removes the trailing linefeed before sending them to our own log.
Notice that as a side-effect we also limit the libevent loglines to 170
characters, which is very generous based on our tests. But this avoids a
little trust in an external library.
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.
This makes the Tx::nextOutput() and similar methods work properly when a
cashToken is encoutered.
For now we just add a simple bool on the output, this may be replaced
with more rich data if that turns out to be needed by the API users.
Transactions can have token information before the output-script,
as such we add the filter and only go for the data we actually want.
This code is written by Telegram user @John_Galts_Gulch.