channeldb+utxonursery+lnwire: use lnwire's OutPoint,TxOut serialization

This commit is contained in:
Philip Hayes authored and Olaoluwa Osuntokun committed 2017-08-25 17:56:50 -07:00
1 parent 7f575b688e
commit f0aa186a56
10 files changed
+232 -174

No files matched your search

+3 -3
View File
@@ -269,7 +269,7 @@ func (d *DB) fetchNodeChannels(openChanBucket,
outBytes := bytes.NewReader(k)
chanID := &wire.OutPoint{}
if err := readOutpoint(outBytes, chanID); err != nil {
if err := lnwire.ReadOutPoint(outBytes, chanID); err != nil {
return err
}
@@ -373,7 +373,7 @@ func (d *DB) MarkChannelAsOpen(outpoint *wire.OutPoint,
// Generate the database key, which will consist of the
// IsPending prefix followed by the channel's outpoint.
var b bytes.Buffer
if err := writeOutpoint(&b, outpoint); err != nil {
if err := lnwire.WriteOutPoint(&b, outpoint); err != nil {
return err
}
keyPrefix := make([]byte, 3+b.Len())
@@ -455,7 +455,7 @@ func (d *DB) FetchClosedChannels(pendingOnly bool) ([]*ChannelCloseSummary, erro
func (d *DB) MarkChanFullyClosed(chanPoint *wire.OutPoint) error {
return d.Update(func(tx *bolt.Tx) error {
var b bytes.Buffer
if err := writeOutpoint(&b, chanPoint); err != nil {
if err := lnwire.WriteOutPoint(&b, chanPoint); err != nil {
return err
}