@@ -870,12 +870,10 @@ async def _resolver(self, x, wallet: Abstract_Wallet):
870870 if x is None :
871871 return None
872872 out = await wallet .contacts .resolve (x )
873- if out .get ('type' ) == 'openalias' and self .nocheck is False and out .get ('validated' ) is False :
874- raise UserFacingException (f"cannot verify alias: { x } " )
875873 return out ['address' ]
876874
877875 @command ('n' )
878- async def sweep (self , privkey , destination , fee = None , feerate = None , nocheck = False , imax = 100 ):
876+ async def sweep (self , privkey , destination , fee = None , feerate = None , imax = 100 ):
879877 """
880878 Sweep private keys. Returns a transaction that spends UTXOs from
881879 privkey to a destination address. The transaction will not be broadcast.
@@ -885,12 +883,10 @@ async def sweep(self, privkey, destination, fee=None, feerate=None, nocheck=Fals
885883 arg:decimal:fee:Transaction fee (absolute, in BTC)
886884 arg:decimal:feerate:Transaction fee rate (in sat/vbyte)
887885 arg:int:imax:Maximum number of inputs
888- arg:bool:nocheck:Do not verify aliases
889886 """
890887 from .wallet import sweep
891888 fee_policy = self ._get_fee_policy (fee , feerate )
892889 privkeys = privkey .split ()
893- self .nocheck = nocheck
894890 #dest = self._resolver(destination)
895891 tx = await sweep (
896892 privkeys ,
@@ -942,7 +938,7 @@ def _get_fee_policy(self, fee: str, feerate: str):
942938
943939 @command ('wp' )
944940 async def payto (self , destination , amount , fee = None , feerate = None , from_addr = None , from_coins = None , change_addr = None ,
945- nocheck = False , unsigned = False , rbf = True , password = None , locktime = None , addtransaction = False , wallet : Abstract_Wallet = None ):
941+ unsigned = False , rbf = True , password = None , locktime = None , addtransaction = False , wallet : Abstract_Wallet = None ):
946942 """Create an on-chain transaction.
947943
948944 arg:str:destination:Bitcoin address, contact or alias
@@ -955,7 +951,6 @@ async def payto(self, destination, amount, fee=None, feerate=None, from_addr=Non
955951 arg:bool:addtransaction:Whether transaction is to be used for broadcasting afterwards. Adds transaction to the wallet
956952 arg:int:locktime:Set locktime block number
957953 arg:bool:unsigned:Do not sign transaction
958- arg:bool:nocheck:Do not verify aliases
959954 arg:json:from_coins:Source coins (must be in wallet; use sweep to spend from non-wallet address)
960955 """
961956 return await self .paytomany (
@@ -965,7 +960,6 @@ async def payto(self, destination, amount, fee=None, feerate=None, from_addr=Non
965960 from_addr = from_addr ,
966961 from_coins = from_coins ,
967962 change_addr = change_addr ,
968- nocheck = nocheck ,
969963 unsigned = unsigned ,
970964 rbf = rbf ,
971965 password = password ,
@@ -976,7 +970,7 @@ async def payto(self, destination, amount, fee=None, feerate=None, from_addr=Non
976970
977971 @command ('wp' )
978972 async def paytomany (self , outputs , fee = None , feerate = None , from_addr = None , from_coins = None , change_addr = None ,
979- nocheck = False , unsigned = False , rbf = True , password = None , locktime = None , addtransaction = False , wallet : Abstract_Wallet = None ):
973+ unsigned = False , rbf = True , password = None , locktime = None , addtransaction = False , wallet : Abstract_Wallet = None ):
980974 """Create a multi-output transaction.
981975
982976 arg:json:outputs:json list of ["address", "amount in BTC"]
@@ -988,10 +982,8 @@ async def paytomany(self, outputs, fee=None, feerate=None, from_addr=None, from_
988982 arg:bool:addtransaction:Whether transaction is to be used for broadcasting afterwards. Adds transaction to the wallet
989983 arg:int:locktime:Set locktime block number
990984 arg:bool:unsigned:Do not sign transaction
991- arg:bool:nocheck:Do not verify aliases
992985 arg:json:from_coins:Source coins (must be in wallet; use sweep to spend from non-wallet address)
993986 """
994- self .nocheck = nocheck
995987 fee_policy = self ._get_fee_policy (fee , feerate )
996988 domain_addr = from_addr .split (',' ) if from_addr else None
997989 domain_coins = from_coins .split (',' ) if from_coins else None
@@ -1150,7 +1142,11 @@ async def getopenalias(self, key, wallet: Abstract_Wallet = None):
11501142
11511143 arg:str:key:the alias to be retrieved
11521144 """
1153- return await wallet .contacts .resolve (key )
1145+ d = await wallet .contacts .resolve (key )
1146+ if d .get ("type" ) == "openalias" :
1147+ # we always validate DNSSEC now
1148+ d ["validated" ] = True
1149+ return d
11541150
11551151 @command ('w' )
11561152 async def searchcontacts (self , query , wallet : Abstract_Wallet = None ):
0 commit comments