Fix importmulti returning rescan errors for wrong keys
Bug was a missing ++i line in a new range for loop added in commit e2e2f4c
"Return errors from importmulti if complete rescans are not successful"
Github-Pull: #9829
Rebased-From: 306bd72157
0.14
Russell Yanofsky8 years agocommitted byWladimir J. van der Laan
result.pushKV("error",JSONRPCError(RPC_MISC_ERROR,strprintf("Failed to rescan before time %d, transactions may be missing.",scannedRange->GetBlockTimeMax())));
result.pushKV("error",JSONRPCError(RPC_MISC_ERROR,strprintf("Failed to rescan before time %d, transactions may be missing.",scannedRange->GetBlockTimeMax())));
BOOST_CHECK_EQUAL(response.write(),strprintf("[{\"success\":false,\"error\":{\"code\":-1,\"message\":\"Failed to rescan before time %d, transactions may be missing.\"}}]",newTip->GetBlockTimeMax()));
BOOST_CHECK_EQUAL(response.write(),strprintf("[{\"success\":false,\"error\":{\"code\":-1,\"message\":\"Failed to rescan before time %d, transactions may be missing.\"}},{\"success\":true}]",newTip->GetBlockTimeMax()));