TomZ
2f7f7cec4c
Nicely initialize the variable every loop
2020-04-24 10:41:55 +02:00
TomZ
e101591f1a
Refactor ScriptEval/ScriptVerify calls
...
Feeling cute, may update this API later.
namespace Script {
struct State {
State() = default;
State(uint32_t flags) : flags(flags) {}
uint32_t flags = SCRIPT_VERIFY_NONE; // validation flags
ScriptError error = SCRIPT_ERR_OK;
const char* errorString() const;
};
bool eval(std::vector<std::vector<unsigned char> > &stack, const CScript
&script, const BaseSignatureChecker checker, Script::State &state);
bool verify(const CScript& scriptSig, const CScript& scriptPubKey, const
BaseSignatureChecker& checker, Script::State &state);
bool checkTransactionSignatureEncoding(const std::vector<unsigned char>
&vchSig, State &state);
}
More of the same.
2020-04-12 18:08:09 +02:00
TomZ
4bea1f55c4
use QElapsedTimer
2020-01-30 15:29:03 +01:00
TomZ
6e6f43a0d4
Remember peerID in DSP-orphanage
...
So when we adopt one proof, and it turns out to be faulty, we can
punish the peer.
2020-01-12 18:06:23 +01:00
TomZ
071629852a
Treat DSP orphans with dignity
...
This improves the double spend proof orphans code.
Also add a DSProof log-category and lots of log lines to make
looking at a debug build much more fun.
2020-01-12 17:41:53 +01:00
TomZ
d6a2488b5c
Cleanup some DSP issues
...
remove the need for 'flags' as this code block doesn't use the
current flags at all.
Also validate proofs that were restored from orphan cache.
2020-01-12 17:10:29 +01:00
TomZ
2b68d149de
Cleanups
2020-01-05 16:47:49 +01:00
TomZ
71f0dcf942
Fixlets
...
Add 'override' keyword on various places.
Make test output a more readable should it fail.
2019-10-10 19:20:04 +02:00
TomZ
922d8b1f16
Fixlets in types
2019-10-05 16:08:37 +02:00
TomZ
9107d7d3b9
Change member from CScript to ConstBuffer
...
The Tx::Output struct can do better by keeping the ConstBuffer as
converting to CScript is cheap, the other way around is not.
2019-10-05 16:08:37 +02:00
TomZ
19bbfe4ce0
Add the concept of DoubleSpendProofs
...
The DSP is owned by the DoubleSpendProofStorage, which in turn
is owned by the mempool.
Each mempool-entry can refer to one proof.
2019-09-02 23:33:12 +02:00