mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix return value when looking up non existent transactions
This commit is contained in:
@@ -161,8 +161,10 @@ Transaction::pointer Transaction::load (uint256 const& id)
|
||||
|
||||
*db << sql, soci::into (ledgerSeq), soci::into (status),
|
||||
soci::into (sociRawTxnBlob, rti);
|
||||
if (db->got_data () && soci::i_ok == rti)
|
||||
convert(sociRawTxnBlob, rawTxn);
|
||||
if (!db->got_data () || rti != soci::i_ok)
|
||||
return {};
|
||||
|
||||
convert(sociRawTxnBlob, rawTxn);
|
||||
}
|
||||
|
||||
return Transaction::transactionFromSQL (
|
||||
|
||||
Reference in New Issue
Block a user