mirror of
https://github.com/dogecoin/dogecoin.git
synced 2026-02-22 13:19:48 +00:00
Merge pull request #1264 from patricklodder/1.10-auxrpc-no-bip22
[auxpow] Guarantee backward compatibility on getauxblock
This commit is contained in:
commit
340163962e
@ -732,7 +732,7 @@ Value estimatepriority(const Array& params, bool fHelp)
|
||||
/* Merge mining. */
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
Value getauxblock(const Array& params, bool fHelp)
|
||||
Value getauxblockbip22(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || (params.size() != 0 && params.size() != 2))
|
||||
throw std::runtime_error(
|
||||
@ -904,4 +904,16 @@ Value getauxblock(const Array& params, bool fHelp)
|
||||
}
|
||||
return BIP22ValidationResult(state);
|
||||
}
|
||||
|
||||
Value getauxblock(const Array& params, bool fHelp)
|
||||
{
|
||||
Value response = getauxblockbip22(params, fHelp);
|
||||
|
||||
// this is a request for a new blocktemplate: return response
|
||||
if (params.size() == 0)
|
||||
return response;
|
||||
|
||||
// this is a new block submission: return bool
|
||||
return (response == Value::null);
|
||||
}
|
||||
#endif // ENABLE_WALLET
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user