v29.4-roots.1 · Commit 4: [PATCH 04/13] wallet: harden database and signing behavior
test/functional/mocks/no_signer.py
Before: /dev/null · After: test/functional/mocks/no_signer.py
File metadata
new file mode 100644 index 0000000000000000000000000000000000000000..04318dac793c57eec2135d244b3487819b9b62b3
Download original patch · Release notes
Diff rows 1–29 of 29. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
test/functional/mocks/no_signer.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# Copyright (c) 2025-present The Bitcoin Core developers
|
| 3 |
+
# Distributed under the MIT software license, see the accompanying
|
| 4 |
+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
| 5 |
+
|
| 6 |
+
import argparse
|
| 7 |
+
import json
|
| 8 |
+
import sys
|
| 9 |
+
|
| 10 |
+
def enumerate(args):
|
| 11 |
+
sys.stdout.write(json.dumps([]))
|
| 12 |
+
|
| 13 |
+
parser = argparse.ArgumentParser(prog='./no_signer.py', description='No external signer connected mock')
|
| 14 |
+
|
| 15 |
+
subparsers = parser.add_subparsers(description='Commands', dest='command')
|
| 16 |
+
subparsers.required = True
|
| 17 |
+
|
| 18 |
+
parser_enumerate = subparsers.add_parser('enumerate', help='list available signers')
|
| 19 |
+
parser_enumerate.set_defaults(func=enumerate)
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
if not sys.stdin.isatty():
|
| 23 |
+
buffer = sys.stdin.read()
|
| 24 |
+
if buffer and buffer.rstrip() != "":
|
| 25 |
+
sys.argv.extend(buffer.rstrip().split(" "))
|
| 26 |
+
|
| 27 |
+
args = parser.parse_args()
|
| 28 |
+
|
| 29 |
+
args.func(args)
|