MCPcopy Create free account
hub / github.com/ElementsProject/lightning / mock_fail_sendrawtx

Function mock_fail_sendrawtx

tests/test_wallet.py:2908–2918  ·  view source on GitHub ↗
(r)

Source from the content-addressed store, hash-verified

2906 # Mock sendrawtransaction to simulate bitcoind rejecting the transaction
2907 # because the feerate is below its mempoolminfee
2908 def mock_fail_sendrawtx(r):
2909 # Self-remove after first call so subsequent transactions aren't blocked
2910 l1.daemon.rpcproxy.mock_rpc('sendrawtransaction', None)
2911 return {
2912 'id': r['id'],
2913 'error': {
2914 'code': -26,
2915 'message': 'min relay fee not met, 253 < 5000',
2916 },
2917 'result': None,
2918 }
2919
2920 l1.daemon.rpcproxy.mock_rpc('sendrawtransaction', mock_fail_sendrawtx)
2921

Callers

nothing calls this directly

Calls 1

mock_rpcMethod · 0.80

Tested by

no test coverage detected