mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-28 23:16:35 +01:00
chainntnfs: ConfirmationEvent now returns details of tx confirmation
This commit modifies the ChainNotifier interface, specifically the ConfirmationEvent struct to now return additional details concerning the exact location in the chain that the transaction was confirmed at. This information will be very useful within the new routing package, as within the network, channels are identified via their channel-ID which is a compact encoding of: blockHeight | txIndex | outputIndex
This commit is contained in:
@@ -74,7 +74,7 @@ func testSingleConfirmationNotification(miner *rpctest.Harness,
|
||||
t.Fatalf("unable to generate single block: %v", err)
|
||||
}
|
||||
|
||||
confSent := make(chan int32)
|
||||
confSent := make(chan *chainntnfs.TxConfirmation)
|
||||
go func() {
|
||||
confSent <- <-confIntent.Confirmed
|
||||
}()
|
||||
@@ -113,7 +113,7 @@ func testMultiConfirmationNotification(miner *rpctest.Harness,
|
||||
t.Fatalf("unable to generate single block: %v", err)
|
||||
}
|
||||
|
||||
confSent := make(chan int32)
|
||||
confSent := make(chan *chainntnfs.TxConfirmation)
|
||||
go func() {
|
||||
confSent <- <-confIntent.Confirmed
|
||||
}()
|
||||
@@ -173,7 +173,7 @@ func testBatchConfirmationNotification(miner *rpctest.Harness,
|
||||
t.Fatalf("unable to generate single block: %v", err)
|
||||
}
|
||||
|
||||
confSent := make(chan int32)
|
||||
confSent := make(chan *chainntnfs.TxConfirmation)
|
||||
go func() {
|
||||
confSent <- <-confIntents[i].Confirmed
|
||||
}()
|
||||
@@ -445,7 +445,7 @@ func testTxConfirmedBeforeNtfnRegistration(miner *rpctest.Harness,
|
||||
t.Fatalf("unable to register ntfn: %v", err)
|
||||
}
|
||||
|
||||
confSent := make(chan int32)
|
||||
confSent := make(chan *chainntnfs.TxConfirmation)
|
||||
go func() {
|
||||
confSent <- <-confIntent.Confirmed
|
||||
}()
|
||||
@@ -487,7 +487,7 @@ func testTxConfirmedBeforeNtfnRegistration(miner *rpctest.Harness,
|
||||
t.Fatalf("unable to generate blocks: %v", err)
|
||||
}
|
||||
|
||||
confSent = make(chan int32)
|
||||
confSent = make(chan *chainntnfs.TxConfirmation)
|
||||
go func() {
|
||||
confSent <- <-confIntent.Confirmed
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user