partial Merge #18878: test: Add test for conflicted wallet tx notifications

Backport notice:
we don't have bumpfee feature, so, only some part of code is backported

f963a680515eda66429b3d1537a7baf281ab9283 test: Add test for conflicted wallet tx notifications (Russell Yanofsky)

Pull request description:

  Add test coverage for conflicted wallet transaction notifications so we can improve current behavior and avoid future regressions

  https://github.com/bitcoin/bitcoin/pull/9240 - accidental break
  https://github.com/bitcoin/bitcoin/issues/9479 - bug report
  https://github.com/bitcoin/bitcoin/pull/9371 - fix
  https://github.com/bitcoin/bitcoin/pull/16624 - accidental break
  https://github.com/bitcoin/bitcoin/issues/18325 - bug report
  https://github.com/bitcoin/bitcoin/pull/18600 - potential fix

ACKs for top commit:
  laanwj:
    ACK f963a680515eda66429b3d1537a7baf281ab9283
  jonatack:
    re-ACK f963a680515eda66429b3d1537a7baf281ab9283
  MarcoFalke:
    ACK f963a680515eda66429b3d1537a7baf281ab9283

Tree-SHA512: d3a7952a2d3dc2ff0800ef857575ea4ef9759c0917d58a7fc91e2db0ca3cc3baf0dd0cf9af61683f691e5fefb11afe8120bb5810c7037ed9ecedee385dd4aa07

fixup dashify of feature_notifications
This commit is contained in:
Wladimir J. van der Laan 2020-05-13 15:44:35 +02:00 committed by Konstantin Akimov
parent db5bd34ee8
commit fab41fd3c5
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524

View File

@ -7,6 +7,7 @@
import os
from test_framework.address import ADDRESS_BCRT1_UNSPENDABLE
from test_framework.test_framework import DashTestFramework
from test_framework.util import (
assert_equal,
@ -95,6 +96,9 @@ class NotificationsTest(DashTestFramework):
# directory content should equal the generated transaction hashes
txids_rpc = list(map(lambda t: notify_outputname(self.wallet, t['txid']), self.nodes[1].listtransactions("*", block_count)))
assert_equal(sorted(txids_rpc), sorted(os.listdir(self.walletnotify_dir)))
for tx_file in os.listdir(self.walletnotify_dir):
os.remove(os.path.join(self.walletnotify_dir, tx_file))
self.log.info("test -chainlocknotify")
@ -141,5 +145,6 @@ class NotificationsTest(DashTestFramework):
# TODO: add test for `-alertnotify` large fork notifications
if __name__ == '__main__':
NotificationsTest().main()