Initial Vexta Core v0.1.0 release
This commit is contained in:
commit
25c454329d
2481 changed files with 689289 additions and 0 deletions
32
test/functional/wallet_fallbackfee.py
Executable file
32
test/functional/wallet_fallbackfee.py
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2017-2021 The DigiByte Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Test wallet replace-by-fee capabilities in conjunction with the fallbackfee."""
|
||||
|
||||
from test_framework.blocktools import COINBASE_MATURITY_2
|
||||
from test_framework.test_framework import DigiByteTestFramework
|
||||
from test_framework.util import assert_raises_rpc_error
|
||||
|
||||
class WalletRBFTest(DigiByteTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 1
|
||||
self.setup_clean_chain = True
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
def run_test(self):
|
||||
self.generate(self.nodes[0], COINBASE_MATURITY_2 + 1)
|
||||
|
||||
# sending a transaction without fee estimations must be possible by default on regtest
|
||||
self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1)
|
||||
|
||||
# test sending a tx with disabled fallback fee (must fail)
|
||||
self.restart_node(0, extra_args=["-fallbackfee=0"])
|
||||
assert_raises_rpc_error(-6, "Fee estimation failed", lambda: self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1))
|
||||
assert_raises_rpc_error(-4, "Fee estimation failed", lambda: self.nodes[0].fundrawtransaction(self.nodes[0].createrawtransaction([], {self.nodes[0].getnewaddress(): 1})))
|
||||
assert_raises_rpc_error(-6, "Fee estimation failed", lambda: self.nodes[0].sendmany("", {self.nodes[0].getnewaddress(): 1}))
|
||||
|
||||
if __name__ == '__main__':
|
||||
WalletRBFTest().main()
|
||||
Loading…
Reference in a new issue