OSDN Git Service

update
authorChengcheng Zhang <943420582@qq.com>
Wed, 3 Jul 2019 15:28:55 +0000 (23:28 +0800)
committerChengcheng Zhang <943420582@qq.com>
Wed, 3 Jul 2019 15:28:55 +0000 (23:28 +0800)
wallet/utxo.go

index a32baaa..2209e64 100644 (file)
@@ -9,16 +9,20 @@ import (
        "github.com/vapor/consensus"
        "github.com/vapor/consensus/segwit"
        "github.com/vapor/crypto/sha3pool"
-       "github.com/vapor/database"
        "github.com/vapor/protocol/bc"
        "github.com/vapor/protocol/bc/types"
 )
 
+var (
+       UTXOPrefix  = []byte{0x00, 0x3a}
+       SUTXOPrefix = []byte{0x01, 0x3a}
+)
+
 // GetAccountUtxos return all account unspent outputs
 func (w *Wallet) GetAccountUtxos(accountID string, id string, unconfirmed, isSmartContract bool, vote bool) []*account.UTXO {
-       prefix := database.UTXOPrefix
+       prefix := UTXOPrefix
        if isSmartContract {
-               prefix = database.SUTXOPrefix
+               prefix = SUTXOPrefix
        }
 
        accountUtxos := []*account.UTXO{}