Skip to content

Commit

Permalink
Merge pull request #24 from phoreproject/unable_to_spend_money_fix
Browse files Browse the repository at this point in the history
Go fmt wallet.go
  • Loading branch information
tohsnoom authored Jun 20, 2019
2 parents ba4e2c9 + 1083f01 commit 9bbd2e7
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions bitcoin/phored/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -1134,14 +1134,6 @@ func (w *RPCWallet) Spend(amount int64, addr btc.Address, feeLevel wallet.FeeLev
if err != nil {
return nil, err
}

buf := bytes.NewBuffer(make([]byte, 0, tx.SerializeSize()))
if err := tx.Serialize(buf); err != nil {
}
txHex := hex.EncodeToString(buf.Bytes())
log.Debugf("Spend tx: %s\n", txHex)


// Broadcast
err = w.Broadcast(tx)
if err != nil {
Expand All @@ -1155,9 +1147,9 @@ func (w *RPCWallet) Spend(amount int64, addr btc.Address, feeLevel wallet.FeeLev
var LookAheadDistance = 5

type ReceivedTx struct {
tx wire.MsgTx
tx wire.MsgTx
blockHeight int32
blockTime time.Time
blockTime time.Time
}

// RetrieveTransactions fetches transactions from the rpc server and stores them into the database
Expand Down Expand Up @@ -1203,7 +1195,7 @@ func (w *RPCWallet) RetrieveTransactions() error {
return nil
}

func (w *RPCWallet) receiveTransactions(addrs []btc.Address, lookAhead bool) []ReceivedTx{
func (w *RPCWallet) receiveTransactions(addrs []btc.Address, lookAhead bool) []ReceivedTx {
numEmptyAddrs := 0

transactions := []ReceivedTx{}
Expand Down

0 comments on commit 9bbd2e7

Please sign in to comment.