diff --git a/src/ripple/app/rdb/impl/UnitaryShard.cpp b/src/ripple/app/rdb/impl/UnitaryShard.cpp index 37cbfd55ac3..ab1758b4852 100644 --- a/src/ripple/app/rdb/impl/UnitaryShard.cpp +++ b/src/ripple/app/rdb/impl/UnitaryShard.cpp @@ -175,6 +175,11 @@ updateLedgerDBs( auto const sParentHash{to_string(ledger->info().parentHash)}; auto const sDrops{to_string(ledger->info().drops)}; + auto const closingTime{ + ledger->info().closeTime.time_since_epoch().count()}; + auto const prevClosingTime{ + ledger->info().parentCloseTime.time_since_epoch().count()}; + auto const closeTimeRes{ledger->info().closeTimeResolution.count()}; auto const sAccountHash{to_string(ledger->info().accountHash)}; auto const sTxHash{to_string(ledger->info().txHash)}; @@ -190,11 +195,8 @@ updateLedgerDBs( ":closingTime, :prevClosingTime, :closeTimeRes," ":closeFlags, :accountSetHash, :transSetHash);", soci::use(sHash), soci::use(ledgerSeq), soci::use(sParentHash), - soci::use(sDrops), - soci::use(ledger->info().closeTime.time_since_epoch().count()), - soci::use( - ledger->info().parentCloseTime.time_since_epoch().count()), - soci::use(ledger->info().closeTimeResolution.count()), + soci::use(sDrops), soci::use(closingTime), + soci::use(prevClosingTime), soci::use(closeTimeRes), soci::use(ledger->info().closeFlags), soci::use(sAccountHash), soci::use(sTxHash); diff --git a/src/ripple/app/rdb/impl/Wallet.cpp b/src/ripple/app/rdb/impl/Wallet.cpp index 25a06bbd97a..3715c4c7458 100644 --- a/src/ripple/app/rdb/impl/Wallet.cpp +++ b/src/ripple/app/rdb/impl/Wallet.cpp @@ -205,19 +205,20 @@ insertPeerReservation( PublicKey const& nodeId, std::string const& description) { + auto const sNodeId = toBase58(TokenType::NodePublic, nodeId); session << "INSERT INTO PeerReservations (PublicKey, Description) " "VALUES (:nodeId, :desc) " "ON CONFLICT (PublicKey) DO UPDATE SET " "Description=excluded.Description", - soci::use(toBase58(TokenType::NodePublic, nodeId)), - soci::use(description); + soci::use(sNodeId), soci::use(description); } void deletePeerReservation(soci::session& session, PublicKey const& nodeId) { + auto const sNodeId = toBase58(TokenType::NodePublic, nodeId); session << "DELETE FROM PeerReservations WHERE PublicKey = :nodeId", - soci::use(toBase58(TokenType::NodePublic, nodeId)); + soci::use(sNodeId); } bool