test: convert docs into type annotations in test_framework/wallet.py

This commit is contained in:
fanquake 2021-05-28 13:21:14 +08:00
parent b043ca8e8b
commit 8bfcba36db
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

View File

@ -6,6 +6,7 @@
from decimal import Decimal
from enum import Enum
from typing import Optional
from test_framework.address import ADDRESS_BCRT1_P2WSH_OP_TRUE
from test_framework.key import ECKey
from test_framework.messages import (
@ -105,12 +106,12 @@ class MiniWallet:
def get_address(self):
return self._address
def get_utxo(self, *, txid='', mark_as_spent=True):
def get_utxo(self, *, txid: Optional[str]='', mark_as_spent=True):
"""
Returns a utxo and marks it as spent (pops it from the internal list)
Args:
txid (string), optional: get the first utxo we find from a specific transaction
txid: get the first utxo we find from a specific transaction
Note: Can be used to get the change output immediately after a send_self_transfer
"""