netann/channel_update: set timestamp via modifier

This commit is contained in:
Conner Fromknecht
2020-03-17 16:25:22 -07:00
parent f6c194c3cd
commit 5147a6d63d
3 changed files with 21 additions and 15 deletions

View File

@@ -103,6 +103,7 @@ func TestUpdateDisableFlag(t *testing.T) {
t.Parallel()
for _, tc := range updateDisableTests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
// Create the initial update, the only fields we are
// concerned with in this test are the timestamp and the
@@ -127,7 +128,8 @@ func TestUpdateDisableFlag(t *testing.T) {
// disabled or enabled as prescribed in the test case.
err := netann.SignChannelUpdate(
tc.signer, pubKey, newUpdate,
netann.ChannelUpdateSetDisable(tc.disable),
netann.ChanUpdSetDisable(tc.disable),
netann.ChanUpdSetTimestamp,
)
var fail bool