@@ -26,11 +26,7 @@ bool GetAddressIndex(CBlockTreeDB& block_tree_db, const uint160& addressHash, co
2626 AssertLockHeld (::cs_main);
2727 EnsureAddressIndexAvailable ();
2828
29- if (!block_tree_db.ReadAddressIndex (addressHash, type, addressIndex, start, end)) {
30- return error (" Unable to get txids for address" );
31- }
32-
33- return true ;
29+ return block_tree_db.ReadAddressIndex (addressHash, type, addressIndex, start, end);
3430}
3531
3632bool GetAddressUnspentIndex (CBlockTreeDB& block_tree_db, const uint160& addressHash, const AddressType type,
@@ -40,7 +36,7 @@ bool GetAddressUnspentIndex(CBlockTreeDB& block_tree_db, const uint160& addressH
4036 EnsureAddressIndexAvailable ();
4137
4238 if (!block_tree_db.ReadAddressUnspentIndex (addressHash, type, unspentOutputs))
43- return error ( " Unable to get txids for address " ) ;
39+ return false ;
4440
4541 if (height_sort) {
4642 std::sort (unspentOutputs.begin (), unspentOutputs.end (),
@@ -60,7 +56,7 @@ bool GetMempoolAddressDeltaIndex(const CTxMemPool& mempool,
6056 EnsureAddressIndexAvailable ();
6157
6258 if (!mempool.getAddressIndex (addressDeltaIndex, addressDeltaEntries))
63- return error ( " Unable to get address delta information " ) ;
59+ return false ;
6460
6561 if (timestamp_sort) {
6662 std::sort (addressDeltaEntries.begin (), addressDeltaEntries.end (),
@@ -84,10 +80,7 @@ bool GetSpentIndex(CBlockTreeDB& block_tree_db, const CTxMemPool& mempool, const
8480 if (mempool.getSpentIndex (key, value))
8581 return true ;
8682
87- if (!block_tree_db.ReadSpentIndex (key, value))
88- return error (" Unable to get spend information" );
89-
90- return true ;
83+ return block_tree_db.ReadSpentIndex (key, value);
9184}
9285
9386bool GetTimestampIndex (CBlockTreeDB& block_tree_db, const uint32_t high, const uint32_t low,
@@ -99,8 +92,5 @@ bool GetTimestampIndex(CBlockTreeDB& block_tree_db, const uint32_t high, const u
9992 throw JSONRPCError (RPC_INVALID_REQUEST, " Timestamp index is disabled. You should run Dash Core with -timestampindex (requires reindex)" );
10093 }
10194
102- if (!block_tree_db.ReadTimestampIndex (high, low, hashes))
103- return error (" Unable to get hashes for timestamps" );
104-
105- return true ;
95+ return block_tree_db.ReadTimestampIndex (high, low, hashes);
10696}
0 commit comments