[wallet] Return object from upgradewallet RPC

This commit is contained in:
Sishir Giri
2020-10-18 18:01:42 -07:00
committed by John Newbery
parent 867dbeba5f
commit 2ead31fb1b
2 changed files with 13 additions and 4 deletions

View File

@ -107,7 +107,7 @@ class UpgradeWalletTest(BitcoinTestFramework):
# calling upgradewallet without version arguments
# should return nothing if successful
assert_equal(wallet.upgradewallet(), "")
assert_equal(wallet.upgradewallet(), {})
new_version = wallet.getwalletinfo()["walletversion"]
# upgraded wallet version should be greater than older one
assert_greater_than(new_version, old_version)
@ -130,7 +130,7 @@ class UpgradeWalletTest(BitcoinTestFramework):
assert_equal('hdseedid' in wallet.getwalletinfo(), False)
# calling upgradewallet with explicit version number
# should return nothing if successful
assert_equal(wallet.upgradewallet(169900), "")
assert_equal(wallet.upgradewallet(169900), {})
new_version = wallet.getwalletinfo()["walletversion"]
# upgraded wallet should have version 169900
assert_equal(new_version, 169900)