Add dlc wallet test to postgres matrix (#3199)

* Add dlc wallet test to postgres matrix

* Fix migration and DAO

Co-authored-by: Ben Carman <benthecarman@live.com>
This commit is contained in:
Chris Stewart 2021-05-31 06:51:39 -05:00 committed by GitHub
parent ccc4035056
commit 43a5c5fc49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View file

@ -30,4 +30,4 @@ jobs:
~/.bitcoin-s/binaries
key: ${{ runner.os }}-cache
- name: run tests
run: sbt ++2.13.5 downloadBitcoind dbCommonsTest/test walletTest/test chainTest/test nodeTest/test
run: sbt ++2.13.5 downloadBitcoind dbCommonsTest/test walletTest/test dlcWalletTest/test chainTest/test nodeTest/test

View file

@ -5,7 +5,7 @@ CREATE TABLE "global_dlc_data"
"contract_id" TEXT UNIQUE,
"protocol_version" INTEGER NOT NULL,
"state" TEXT NOT NULL,
"is_initiator" INTEGER NOT NULL,
"is_initiator" BOOLEAN NOT NULL,
"account" TEXT NOT NULL,
"change_index" INTEGER NOT NULL,
"key_index" INTEGER NOT NULL,
@ -102,7 +102,7 @@ CREATE TABLE "funding_inputs"
(
"out_point" TEXT PRIMARY KEY,
"dlc_id" TEXT NOT NULL,
"is_initiator" INTEGER NOT NULL,
"is_initiator" BOOLEAN NOT NULL,
"input_serial_id" TEXT NOT NULL,
"output" TEXT NOT NULL,
"max_witness_length" INTEGER NOT NULL,

View file

@ -7,7 +7,7 @@ import org.bitcoins.core.protocol.transaction.Transaction
import org.bitcoins.crypto.DoubleSha256DigestBE
import org.bitcoins.dlc.wallet.DLCAppConfig
import org.bitcoins.wallet.models.TxDAO
import slick.lifted.{PrimaryKey, ProvenShape}
import slick.lifted.ProvenShape
import scala.concurrent.ExecutionContext
@ -56,8 +56,5 @@ case class DLCRemoteTxDAO()(implicit
numOutputs,
locktime,
blockHash).<>(TransactionDb.tupled, TransactionDb.unapply)
def primaryKey: PrimaryKey =
primaryKey("pk_tx", sourceColumns = txIdBE)
}
}