Skip to content

Commit

Permalink
Merge branch 'master' of github.com:CounterpartyXCP/counterparty-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
jdogresorg committed Aug 26, 2022
2 parents 5716a48 + 4f7a9b2 commit d7fa0af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions counterpartylib/lib/messages/issuance.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def initialise(db):
locked BOOL,
status TEXT,
asset_longname TEXT,
reset BOOL,
FOREIGN KEY (tx_index, tx_hash, block_index) REFERENCES transactions(tx_index, tx_hash, block_index))
''')

Expand Down Expand Up @@ -76,16 +77,17 @@ def initialise(db):
locked BOOL,
status TEXT,
asset_longname TEXT,
reset BOOL,
PRIMARY KEY (tx_index, msg_index),
FOREIGN KEY (tx_index, tx_hash, block_index) REFERENCES transactions(tx_index, tx_hash, block_index),
UNIQUE (tx_hash, msg_index))
''')
cursor.execute('''INSERT INTO new_issuances(tx_index, tx_hash, msg_index,
block_index, asset, quantity, divisible, source, issuer, transfer, callable,
call_date, call_price, description, fee_paid, locked, status, asset_longname)
call_date, call_price, description, fee_paid, locked, status, asset_longname, reset)
SELECT tx_index, tx_hash, 0, block_index, asset, quantity, divisible, source,
issuer, transfer, callable, call_date, call_price, description, fee_paid,
locked, status, asset_longname FROM issuances''', {})
locked, status, asset_longname, reset FROM issuances''', {})
cursor.execute('DROP TABLE issuances')
cursor.execute('ALTER TABLE new_issuances RENAME TO issuances')

Expand Down

0 comments on commit d7fa0af

Please sign in to comment.