discovery+graph: convert errors from codes to variables
In preparation for moving funding transaction validiation from the Builder to the Gossiper in later commit, we first convert these graph Error Codes to normal error variables. This will help make the later commit a pure code move.
This commit is contained in:
5 files changed
+49
-59
No files matched your search
@@ -1275,14 +1275,12 @@ func newChannelEdgeInfo(t *testing.T, ctx *testCtx, fundingHeight uint32,
|
||||
}
|
||||
|
||||
func assertChanChainRejection(t *testing.T, ctx *testCtx,
|
||||
edge *models.ChannelEdgeInfo, failCode ErrorCode) {
|
||||
edge *models.ChannelEdgeInfo, expectedErr error) {
|
||||
|
||||
t.Helper()
|
||||
|
||||
err := ctx.builder.AddEdge(edge)
|
||||
if !IsError(err, failCode) {
|
||||
t.Fatalf("validation should have failed: %v", err)
|
||||
}
|
||||
require.ErrorIs(t, err, expectedErr)
|
||||
|
||||
// This channel should now be present in the zombie channel index.
|
||||
_, _, _, isZombie, err := ctx.graph.HasChannelEdge(
|
||||
|
||||
Reference in new issue
Block a user