diff --git a/core/src/wallet/bitcoin/database/BitcoinLikeOperationDatabaseHelper.cpp b/core/src/wallet/bitcoin/database/BitcoinLikeOperationDatabaseHelper.cpp index 78ecc07a4..0a6d100d8 100644 --- a/core/src/wallet/bitcoin/database/BitcoinLikeOperationDatabaseHelper.cpp +++ b/core/src/wallet/bitcoin/database/BitcoinLikeOperationDatabaseHelper.cpp @@ -233,7 +233,7 @@ namespace { const auto UPSERT_OUTPUT = db::stmt( "INSERT INTO bitcoin_outputs VALUES(:idx, :tx_uid, :hash, :amount, :script, :address, " ":account_uid, :block_height, :replaceable) " - "ON CONFLICT DO NOTHING", + "ON CONFLICT(idx, transaction_uid) DO UPDATE SET block_height=excluded.block_height", [](auto &s, auto &b) { s, use(b.index), use(b.txUid), use(b.txHash), use(b.amount), use(b.script), use(b.address), use(b.accountUid),