-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed the sender and receiver protocol sin the wallet database to use bytes instead of a hex string, as the underlying data type is encrypted bytes. This issue was highlighted due to the to_hex function in tari_utilities not being able to convert large transactions into hex strings (returned **String to large**) for saving in the wallet database.
- Loading branch information
1 parent
55bbdf2
commit 361f0ea
Showing
6 changed files
with
252 additions
and
58 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
base_layer/wallet/migrations/2023-11-13-082000_transaction_protocols/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-- This file should undo anything in `up.sql` |
36 changes: 36 additions & 0 deletions
36
base_layer/wallet/migrations/2023-11-13-082000_transaction_protocols/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
-- Any old 'inbound_transactions' will not be valid due to the change in 'receiver_protocol' to 'BLOB', so we drop and | ||
-- recreate the table. | ||
|
||
DROP TABLE inbound_transactions; | ||
CREATE TABLE inbound_transactions | ||
( | ||
tx_id BIGINT PRIMARY KEY NOT NULL, | ||
source_address BLOB NOT NULL, | ||
amount BIGINT NOT NULL, | ||
receiver_protocol BLOB NOT NULL, | ||
message TEXT NOT NULL, | ||
timestamp DATETIME NOT NULL, | ||
cancelled INTEGER NOT NULL, | ||
direct_send_success INTEGER DEFAULT 0 NOT NULL, | ||
send_count INTEGER DEFAULT 0 NOT NULL, | ||
last_send_timestamp DATETIME NULL | ||
); | ||
|
||
-- Any old 'outbound_transactions' will not be valid due to the change in 'sender_protocol' to 'BLOB', so we drop and | ||
-- recreate the table. | ||
|
||
DROP TABLE outbound_transactions; | ||
CREATE TABLE outbound_transactions | ||
( | ||
tx_id BIGINT PRIMARY KEY NOT NULL, | ||
destination_address BLOB NOT NULL, | ||
amount BIGINT NOT NULL, | ||
fee BIGINT NOT NULL, | ||
sender_protocol BLOB NOT NULL, | ||
message TEXT NOT NULL, | ||
timestamp DATETIME NOT NULL, | ||
cancelled INTEGER DEFAULT 0 NOT NULL, | ||
direct_send_success INTEGER DEFAULT 0 NOT NULL, | ||
send_count INTEGER DEFAULT 0 NOT NULL, | ||
last_send_timestamp DATETIME NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.