diff options
| author | Max K. <[email protected]> | 2015-08-26 21:52:55 +0200 |
|---|---|---|
| committer | Max K. <[email protected]> | 2015-08-26 21:52:55 +0200 |
| commit | 340163962ef7ab00ff80c8cc6a28f10eaa9a4dac (patch) | |
| tree | f281ea7a1ae0dae124b372bc79aea37dad52d21d /src/rpcmining.cpp | |
| parent | Merge pull request #1247 from rnicoll/1.10-attribution (diff) | |
| parent | [auxpow] Guarantee backward compatibility on getauxblock (diff) | |
| download | discoin-340163962ef7ab00ff80c8cc6a28f10eaa9a4dac.tar.xz discoin-340163962ef7ab00ff80c8cc6a28f10eaa9a4dac.zip | |
Merge pull request #1264 from patricklodder/1.10-auxrpc-no-bip22
[auxpow] Guarantee backward compatibility on getauxblock
Diffstat (limited to 'src/rpcmining.cpp')
| -rw-r--r-- | src/rpcmining.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index ab878c105..87693bd8e 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -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 |