OSDN Git Service

update id
authorChengcheng Zhang <943420582@qq.com>
Wed, 3 Jul 2019 12:37:38 +0000 (20:37 +0800)
committerChengcheng Zhang <943420582@qq.com>
Wed, 3 Jul 2019 12:37:38 +0000 (20:37 +0800)
account/utxo_keeper_test.go

index 61358b0..60503ad 100644 (file)
@@ -1331,14 +1331,12 @@ var (
 
 // StandardUTXOKey makes an account unspent outputs key to store
 func StandardUTXOKey(id bc.Hash) []byte {
-       name := id.String()
-       return append(UTXOPrefix, []byte(name)...)
+       return append(UTXOPrefix, id.Bytes()...)
 }
 
 // ContractUTXOKey makes a smart contract unspent outputs key to store
 func ContractUTXOKey(id bc.Hash) []byte {
-       name := id.String()
-       return append(SUTXOPrefix, []byte(name)...)
+       return append(SUTXOPrefix, id.Bytes()...)
 }
 
 func (store *mockAccountStore) InitBatch() error                                { return nil }