getmemorypool patch by Sunny King
authoralex <alex@alex-VirtualBox.(none)>
Mon, 18 Feb 2013 00:37:12 +0000 (04:37 +0400)
committeralex <alex@alex-VirtualBox.(none)>
Mon, 18 Feb 2013 00:37:12 +0000 (04:37 +0400)
src/bitcoinrpc.cpp

index e2f7d27..0a53c7f 100644 (file)
@@ -1992,7 +1992,12 @@ Value getmemorypool(const Array& params, bool fHelp)
         CBlock pblock;
         ssBlock >> pblock;
 
-        return ProcessBlock(NULL, &pblock);
+        static CReserveKey reservekey(pwalletMain);
+
+        if(!pblock.SignBlock(*pwalletMain))
+            throw JSONRPCError(-100, "Unable to sign block, wallet locked?");
+
+        return CheckWork(&pblock, *pwalletMain, reservekey);
     }
 }