routing: add validation of utxo

Add check that the edge that was received really exist in the blockchain
and that the announced funding keys and capcity corresponds to reality.
This commit is contained in:
Andrey Samokhvalov
2017-03-30 04:01:28 +03:00
committed by Olaoluwa Osuntokun
parent 19174ebdfd
commit 4bca54e30c
4 changed files with 94 additions and 68 deletions

View File

@@ -6,8 +6,10 @@ import (
"fmt"
"testing"
"github.com/davecgh/go-spew/spew"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/roasbeef/btcd/wire"
"github.com/davecgh/go-spew/spew"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/roasbeef/btcd/btcec"
"github.com/roasbeef/btcutil"
@@ -46,7 +48,7 @@ func createTestCtx(startingHeight uint32, testGraph ...string) (*testCtx, func()
return nil, nil, fmt.Errorf("unable to create test graph: %v", err)
}
sourceNode, err = createGraphNode()
sourceNode, err = createTestNode()
if err != nil {
return nil, nil, fmt.Errorf("unable to create source node: %v", err)
}