deep copy output to prevent side-effect
This commit is contained in:
@@ -121,7 +121,8 @@ class Commands:
|
|||||||
return h
|
return h
|
||||||
|
|
||||||
def listunspent(self):
|
def listunspent(self):
|
||||||
l = self.wallet.get_unspent_coins()
|
import copy
|
||||||
|
l = copy.deepcopy(self.wallet.get_unspent_coins())
|
||||||
for i in l: i["value"] = i["value"]*1e-8
|
for i in l: i["value"] = i["value"]*1e-8
|
||||||
return l
|
return l
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user