wallet: export NewAccountFromPrivateKey()

Don't perform back-and-forth conversion, don't handle error
which never occur.
This commit is contained in:
Evgenii Stratonikov 2020-12-04 12:40:22 +03:00
parent 239a8c3de7
commit cd5219086a
5 changed files with 15 additions and 27 deletions

View file

@ -996,8 +996,7 @@ func testRPCProtocol(t *testing.T, doRPCCall func(string, string, *testing.T) []
})
priv0 := testchain.PrivateKeyByID(0)
acc0, err := wallet.NewAccountFromWIF(priv0.WIF())
require.NoError(t, err)
acc0 := wallet.NewAccountFromPrivateKey(priv0)
addNetworkFee := func(tx *transaction.Transaction) {
size := io.GetVarSize(tx)