Skip to content

Commit 82a0c51

Browse files
authored
Merge pull request #785 from Roasbeef/v0-3-3-branch
release: create v0.3.3 rc release branch
2 parents 86b4039 + 0b7aade commit 82a0c51

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

tapdb/sqlc/migrations/000015_asset_witnesses.up.sql

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
-- The witness index indicates the order of the witness in the list of witnesses
2-
-- for a given asset. We didn't really support more than one witness before, so
3-
-- the default value of 0 should be fine for all existing assets.
4-
ALTER TABLE asset_witnesses ADD COLUMN witness_index INTEGER NOT NULL DEFAULT 0;
2+
-- for a given asset. We'll be inserting an actual value in the next query, so
3+
-- we just start with -1.
4+
ALTER TABLE asset_witnesses ADD COLUMN witness_index INTEGER NOT NULL DEFAULT -1;
5+
6+
-- Update the witness index to be the same as the witness id. We'll use the
7+
-- witness_index for sorting only, so setting the default to the witness_id is
8+
-- just to make sure we preserve the current order of witnesses while also
9+
-- satisfying the unique constraint we add below.
10+
UPDATE asset_witnesses SET witness_index = CAST(witness_id AS INTEGER)
11+
WHERE witness_index = -1;
512

613
-- We need to be able to upsert witnesses, so we need a unique constraint on
714
-- (asset_id, witness_index).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-- This dummy data inserts a single asset that has two witness entries so we can
2+
-- test the migration 15 that adds the witness_index column to the
3+
-- asset_witnesses table.
4+
INSERT INTO chain_txns VALUES(1,X'a1594fc379308b2a209f6d0bdb8602e9f87cf71fc232c69032b9a5fed28f9331',1980,X'02000000000101022cd51ca4d850c5f71ceedf7c50a08ff82d66612b22f631eac95e6b52cbbd2d0000000000ffffffff02e80300000000000022512018ac5a65a0d12e7846c89d24705e2697b1da14627978ba8db24bdbce21fc2aa85cd5f5050000000022512030263d67b4275144b2b00921d220a1311b9a4465fa656ba7d5754b421cb4308402483045022100fa32af97cab8a765dc347c3ff57b14f9810b6dbfc4d02727fb099d1ed875660602204cb66f3bbd92925707158b4aa67338c50a9ffddceb023875eb82b78b3967e007012102eb9cd2a22fd11c40823cb7b0f0fba4156138af69cf73c0644be54f4d46ba480700000000',441,X'4295613d85ccbc455159eb4ddd1e266ca10041d3c75726286b7dfeb3132c9c4f',1);
5+
6+
INSERT INTO genesis_points VALUES(1,X'022cd51ca4d850c5f71ceedf7c50a08ff82d66612b22f631eac95e6b52cbbd2d00000000',1);
7+
8+
INSERT INTO assets_meta VALUES(1,X'2b990b7adb1faf51ccb9b1c73bc5e73926db39cdec8906d4fd3c6c423a3c9821',X'736f6d65206d65746164617461',0);
9+
10+
INSERT INTO genesis_assets VALUES(1,X'add7d0d7cc37e58a7c0d8ad40b6904050d2baa25a1829f00689c4b27b524dd04','itestbuxx-collectible',1,0,1,1);
11+
12+
INSERT INTO internal_keys VALUES(1,X'02827d74858d152da1fae12010ad8d3c46b595c2d4480512a6575925424617124f',212,0);
13+
INSERT INTO internal_keys VALUES(2,X'03efbcf2878876bae81ca9a7f6476764d2da38d565b9fb2b691e7bb22fd99f9e5e',212,2);
14+
15+
INSERT INTO managed_utxos VALUES(1,X'a1594fc379308b2a209f6d0bdb8602e9f87cf71fc232c69032b9a5fed28f933100000000',1000,1,X'1dd3e2cf0bbbee32832c4deb57bbae58779fa599be0b8eb1f61e8c624157e2fa',NULL,X'1dd3e2cf0bbbee32832c4deb57bbae58779fa599be0b8eb1f61e8c624157e2fa',1,NULL,NULL);
16+
17+
INSERT INTO script_keys VALUES(1,2,X'029c571fffcac1a1a7cd3372bd202ad8562f28e48b90f8a4eb714eca062f576ee6',NULL);
18+
19+
INSERT INTO assets VALUES(1,1,1,1,NULL,0,1,0,0,NULL,NULL,1,false);
20+
21+
INSERT INTO asset_witnesses VALUES(1,1,X'a1594fc379308b2a209f6d0bdb8602e9f87cf71fc232c69032b9a5fed28f933100000000',X'add7d0d7cc37e58a7c0d8ad40b6904050d2baa25a1829f00689c4b27b524dd04',X'02827d74858d152da1fae12010ad8d3c46b595c2d4480512a6575925424617124f',X'0101aa',NULL);
22+
INSERT INTO asset_witnesses VALUES(2,1,X'a1594fc379308b2a209f6d0bdb8602e9f87cf71fc232c69032b9a5fed28f933101000000',X'add7d0d7cc37e58a7c0d8ad40b6904050d2baa25a1829f00689c4b27b524dd04',X'02827d74858d152da1fae12010ad8d3c46b595c2d4480512a6575925424617124f',X'0101bb',NULL);

version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const (
4949

5050
// AppPreRelease MUST only contain characters from semanticAlphabet
5151
// per the semantic versioning spec.
52-
AppPreRelease = "alpha.rc2"
52+
AppPreRelease = "alpha.rc3"
5353

5454
// defaultAgentName is the default name of the software that is added as
5555
// the first part of the user agent string.

0 commit comments

Comments
 (0)