This sets the permissions on the saved blk file to be writable, seems
that a qrc input causes Qt to create it with QFile::copy() as read-only
by default.
We now removed the need for Boost:chrono in all the libs, to avoid
accidentally linking to it again this change makes the apps link to
the actual specific libs instead of just all.
This renames lots of variables to be more "correct" (call it
output instead of transaction and similar things).
This removes duplication by moving repeated into methods.
This fixes the behavior of the dsproof calls to be back to
the old unit test, while adding the new fields to the unit
test for minimal change.
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.
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
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.
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.
This adds endsWith() and an extra startsWith() overload.
We also added tests for the case when either the argument or the object
are empty and specify the behavior. I copied the behavior of QString.
See unit tests that specify the behavior with empties.
The blockchain object holds all block-headers, the backing store for
this class is now being exposed more to allow understanding what we have
or not have available. And also what the source of that info is.
As we moved most of the creation of a BufferPool to be via the
Streaming::pool() method, which uses a thread-local, it makes sense
to start cleaning up the design and make it more modern C++.
The above mentioned method would return a reference and you'd see
loads of places use `auto &pool =` which is less than ideal.
As the number of places where we actually instantiate a BufferPool
goes down, the usage of some sort of smart pointer makes more sense.
This now makes all APIs use BufferPool be wrapped in a shared_ptr.
This follows the coding style guideline that the file that contains a
class should follow the exact name of this (main) class.
key.{h|cpp} -> PrivateKey.{h|cpp}
This follows the coding style guideline that the file that contains a
class should follow the exact name of this (main) class.
pubkey.{h|cpp} -> PublicKey.{h|cpp}
pubkey_utils.{h|cpp} -> PublicKeyUtils.{h|cpp}
- Changed API for HDMasterKey::fromMnemonic to use an enum to specify
BIP39 vs Electrum format phrase
- Added unit test for this class to existing unit tests
The blockchain class can effectively now be shallow,
we can have a list of blockheaders of, for instance, the last year
alone. It builds on top of a known checkpoint (hardcoded block data)
and as long as we do not access block info that is unavailable, things
just work like normal.
We throw at the request of a blockheader that is too old.
Protobuf seems to have an incompatible cmake every single release,
which makes including it with cmake itself stupid and indeed lead
to linking or even compile errors.
So, the point of not wanting to use protobuffers directly got again
proven in practice as its a messy thing in all regards.
This makes the unit test for our reimplementation of protobuf
parsing/building become optional. The unit test is the only one
that actually uses the protocol buffers stuff itself, as such
turning that off by default isolates our users from the mess it is.
Protocol Buffers interaction is just another serialization standard,
while its widespread it has fortunately mostly been kept out of
anything relevant or important. Mostly due to the fact that is
really quite bad from a technical perspective.
This adds simple and basic support for creating and parsing
protocol buffer messages, mostly to allow interoperability.
If you want quality: use the MessagBuilder/MessageParser ones instead.
The methodname:
blockHeightAtTime()
makes the reader think about the actual height of the chain at that
time. Returning that value until the timestamp of the next block is
reached.
Now the method actally returns that number.
The code does not do any work to account for blocks going backwards in
time compared to the block before.