mirror of
https://github.com/ACINQ/eclair.git
synced 2025-02-22 22:25:26 +01:00
Improve integration tests (#710)
* added more logs and improved integration test * make travis cache maven data
This commit is contained in:
parent
2c1811d18f
commit
db96c17fd2
3 changed files with 12 additions and 2 deletions
|
@ -9,6 +9,10 @@ env:
|
|||
- export LD_LIBRARY_PATH=/usr/local/lib
|
||||
script:
|
||||
- mvn install
|
||||
cache:
|
||||
directories:
|
||||
- .autoconf
|
||||
- $HOME/.m2
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
notifications:
|
||||
|
|
|
@ -810,7 +810,7 @@ class Channel(val nodeParams: NodeParams, wallet: EclairWallet, remoteNodeId: Pu
|
|||
|
||||
case Event(TickRefreshChannelUpdate, d: DATA_NORMAL) =>
|
||||
// periodic refresh is used as a keep alive
|
||||
log.debug(s"sending channel_update announcement (refresh)")
|
||||
log.info(s"sending channel_update announcement (refresh)")
|
||||
val channelUpdate = Announcements.makeChannelUpdate(nodeParams.chainHash, nodeParams.privateKey, remoteNodeId, d.shortChannelId, d.channelUpdate.cltvExpiryDelta, d.channelUpdate.htlcMinimumMsat, d.channelUpdate.feeBaseMsat, d.channelUpdate.feeProportionalMillionths, enable = true)
|
||||
// we use GOTO instead of stay because we want to fire transitions
|
||||
goto(NORMAL) using store(d.copy(channelUpdate = channelUpdate))
|
||||
|
|
|
@ -261,10 +261,16 @@ class IntegrationSpec extends TestKit(ActorSystem("test")) with BitcoindService
|
|||
assert(sender.expectMsgType[Map[ChannelDesc, ChannelUpdate]].apply(ChannelDesc(channelUpdateBC.shortChannelId, nodes("B").nodeParams.nodeId, nodes("C").nodeParams.nodeId)) === channelUpdateBC)
|
||||
// we then put everything back like before by asking B to refresh its channel update (this will override the one we created)
|
||||
sender.send(nodes("B").register, ForwardShortId(shortIdBC, TickRefreshChannelUpdate))
|
||||
sender.send(nodes("B").register, ForwardShortId(shortIdBC, CMD_GETINFO))
|
||||
val channelUpdateBC_new = sender.expectMsgType[RES_GETINFO].data.asInstanceOf[DATA_NORMAL].channelUpdate
|
||||
logger.info(s"channelUpdateBC=$channelUpdateBC")
|
||||
logger.info(s"channelUpdateBC_new=$channelUpdateBC_new")
|
||||
assert(channelUpdateBC_new.timestamp > channelUpdateBC.timestamp)
|
||||
assert(channelUpdateBC_new.cltvExpiryDelta == nodes("B").nodeParams.expiryDeltaBlocks)
|
||||
awaitCond({
|
||||
sender.send(nodes("A").router, 'updatesMap)
|
||||
val u = sender.expectMsgType[Map[ChannelDesc, ChannelUpdate]].apply(ChannelDesc(channelUpdateBC.shortChannelId, nodes("B").nodeParams.nodeId, nodes("C").nodeParams.nodeId))
|
||||
u.cltvExpiryDelta == 144
|
||||
u.cltvExpiryDelta == nodes("B").nodeParams.expiryDeltaBlocks
|
||||
}, max = 30 seconds, interval = 1 second)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue