Increase offer message size (#4136)

This commit is contained in:
rorp 2022-02-27 05:53:35 -08:00 committed by GitHub
parent 8f02ebce10
commit ee98aa1d30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -89,7 +89,7 @@ class DbManagementTest extends BitcoinSAsyncTest with EmbeddedPg {
assert(flywayInfo.applied().length == expected) assert(flywayInfo.applied().length == expected)
assert(flywayInfo.pending().length == 0) assert(flywayInfo.pending().length == 0)
case PostgreSQL => case PostgreSQL =>
val expected = 6 val expected = 7
assert(result == expected) assert(result == expected)
val flywayInfo = dlcAppConfig.info() val flywayInfo = dlcAppConfig.info()

View File

@ -0,0 +1 @@
ALTER TABLE incoming_offers ALTER COLUMN message SET DATA TYPE VARCHAR(1024);

View File

@ -12,9 +12,9 @@ case class IncomingDLCOfferDb(
message: Option[String], message: Option[String],
offerTLV: DLCOfferTLV) { offerTLV: DLCOfferTLV) {
require(peer.forall(_.length <= 1024), require(peer.forall(_.length <= 1024),
"peer length must not exceed 1024 character") "peer length must not exceed 1024 characters")
require(message.forall(_.length <= 280), require(message.forall(_.length <= 1024),
"message length must not exceed 280 character") "message length must not exceed 1024 characters")
} }
object IncomingDLCOfferDbHelper { object IncomingDLCOfferDbHelper {