- Add core_io function DecodeAuxPow implementing a save means to
parse a hex encoded auxpow string into a CAuxPow instance
- Parse both the hash and the hex in the receiving methods, and
return meaningful errors when they fail.
1. Providing a malformed hash now returns RPC_INVALID_PARAMETER
(-8) instead of the generic -1
2. Providing a malformed auxpow hex now returns
RPC_DESERIALIZATION_ERROR (-22) instead of the generic -1
1. Introduces a single cache for templated blocks CAuxBlockCache
that is indexed and searchable by both coinbase script and
block hash.
2. Integrates the new cache into AuxMiningCreateBlock and
AuxMiningSubmitBlock rpc helper functions
3. Modifies AuxMiningSubmitBlock to return the BIP-22 response
4. Modifies getauxblockbip22 to user AuxMiningSubmitBlock
Note that although we return the BIP-22 response in
AuxMiningSubmitBlock and getauxblockbip22, there is currently no
method or configuration that returns this over rpc. All methods
return a boolean response. This remains unchanged for backward
compatibility.
Aims to isolate auxpow code for readability and to make a clear
demarcation for this custom Dogecoin functionality. Only moves
code.
- Creates a header for mining/auxpow shared usage containing
common functions between these functions.
- Moves all auxpow RPC methods into rpc/auxpow.cpp