mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-29 12:15:22 +08:00
switch to virtualchain over pybitcoin
This commit is contained in:
@@ -102,8 +102,7 @@ from .constants import (
|
|||||||
from .b40 import is_b40
|
from .b40 import is_b40
|
||||||
from .storage import get_drivers_for_url, get_driver_urls, get_storage_handlers
|
from .storage import get_drivers_for_url, get_driver_urls, get_storage_handlers
|
||||||
|
|
||||||
from pybitcoin import is_b58check_address, serialize_transaction
|
from pybitcoin import serialize_transaction
|
||||||
from pybitcoin.transactions.outputs import calculate_change_amount
|
|
||||||
|
|
||||||
from .backend.blockchain import (
|
from .backend.blockchain import (
|
||||||
get_balance, is_address_usable, get_utxos, broadcast_tx,
|
get_balance, is_address_usable, get_utxos, broadcast_tx,
|
||||||
@@ -461,7 +460,7 @@ def cli_withdraw(args, password=None, interactive=True, wallet_keys=None, config
|
|||||||
return {'error': 'Cannot withdraw dust'}
|
return {'error': 'Cannot withdraw dust'}
|
||||||
|
|
||||||
else:
|
else:
|
||||||
change = calculate_change_amount(inputs, amt, tx_fee)
|
change = virtualchain.calculate_change_amount(inputs, amt, tx_fee)
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
{'script_hex': virtualchain.make_payment_script(recipient_addr),
|
{'script_hex': virtualchain.make_payment_script(recipient_addr),
|
||||||
@@ -2407,7 +2406,7 @@ def cli_consensus(args, config_path=CONFIG_PATH):
|
|||||||
|
|
||||||
def cli_api(args, password=None, interactive=True, config_path=CONFIG_PATH):
|
def cli_api(args, password=None, interactive=True, config_path=CONFIG_PATH):
|
||||||
"""
|
"""
|
||||||
command: api
|
command: api
|
||||||
help: Control the RESTful API endpoint
|
help: Control the RESTful API endpoint
|
||||||
arg: command (str) '"start", "start-foreground", "stop", or "status"'
|
arg: command (str) '"start", "start-foreground", "stop", or "status"'
|
||||||
opt: wallet_password (str) 'The wallet password. Will prompt if required.'
|
opt: wallet_password (str) 'The wallet password. Will prompt if required.'
|
||||||
|
|||||||
Reference in New Issue
Block a user