multi: update btcsuite API's to latest upstream changes

This commit makes a large number of minor changes concerning API usage
within the deamon to match the latest version on the upstream btcsuite
libraries.

The major changes are the switch from wire.ShaHash to chainhash.Hash,
and that wire.NewMsgTx() now takes a paramter indicating the version of
the transaction to be created.
This commit is contained in:
Olaoluwa Osuntokun
2017-01-05 13:56:27 -08:00
parent 5d37c1d9e7
commit 5affed38fc
40 changed files with 234 additions and 211 deletions

View File

@ -14,6 +14,7 @@ import (
"github.com/lightningnetwork/lnd/channeldb"
"github.com/roasbeef/btcd/btcec"
"github.com/roasbeef/btcd/chaincfg/chainhash"
"github.com/roasbeef/btcd/wire"
"github.com/roasbeef/btcutil"
)
@ -201,7 +202,7 @@ func parseTestGraph(path string) (*channeldb.ChannelGraph, func(), aliasMap, err
}
fundingTXID := strings.Split(edge.ChannelPoint, ":")[0]
txidBytes, err := wire.NewShaHashFromStr(fundingTXID)
txidBytes, err := chainhash.NewHashFromStr(fundingTXID)
if err != nil {
return nil, nil, nil, err
}