You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Naming was confusing because it led to believe messages were related to
htlcs that have not yet been relayed, whereas those are settlement
messages, meaning that htlcs have relayed and are pending resolution
upstream.
The database has been renamed to a more generic `PendingCommandsDb`
because we may store other types of commands for which we need reliable
delivery.
statement.executeUpdate("ALTER TABLE pending_relay RENAME TO pending_settlement_commands")
47
+
}
48
+
42
49
getVersion(statement, DB_NAME) match {
43
50
caseNone=>
44
51
// note: should we use a foreign key to local_channels table here?
45
-
statement.executeUpdate("CREATE TABLE pending_relay (channel_id TEXT NOT NULL, htlc_id BIGINT NOT NULL, data BYTEA NOT NULL, PRIMARY KEY(channel_id, htlc_id))")
52
+
statement.executeUpdate("CREATE TABLE pending_settlement_commands (channel_id TEXT NOT NULL, htlc_id BIGINT NOT NULL, data BYTEA NOT NULL, PRIMARY KEY(channel_id, htlc_id))")
53
+
caseSome(v@1) =>
54
+
logger.warn(s"migrating db $DB_NAME, found version=$v current=$CURRENT_VERSION")
55
+
migration12(statement)
46
56
caseSome(CURRENT_VERSION) => () // table is up-to-date, nothing to do
47
57
caseSome(unknownVersion) =>thrownewRuntimeException(s"Unknown version of DB $DB_NAME found, version=$unknownVersion")
0 commit comments