Fix exclusive or in sent_notes recipient check.
This commit is contained in:
parent
62e1f99eb0
commit
fdf5aa7b8e
|
@ -392,8 +392,7 @@ mod tests {
|
|||
FOREIGN KEY (to_account) REFERENCES accounts(account),
|
||||
CONSTRAINT tx_output UNIQUE (tx, output_pool, output_index),
|
||||
CONSTRAINT note_recipient CHECK (
|
||||
(to_address IS NOT NULL OR to_account IS NOT NULL)
|
||||
AND NOT (to_address IS NOT NULL AND to_account IS NOT NULL)
|
||||
(to_address IS NOT NULL) != (to_account IS NOT NULL)
|
||||
)
|
||||
)",
|
||||
"CREATE TABLE transactions (
|
||||
|
|
|
@ -60,8 +60,7 @@ impl RusqliteMigration for Migration {
|
|||
FOREIGN KEY (to_account) REFERENCES accounts(account),
|
||||
CONSTRAINT tx_output UNIQUE (tx, output_pool, output_index),
|
||||
CONSTRAINT note_recipient CHECK (
|
||||
(to_address IS NOT NULL OR to_account IS NOT NULL)
|
||||
AND NOT (to_address IS NOT NULL AND to_account IS NOT NULL)
|
||||
(to_address IS NOT NULL) != (to_account IS NOT NULL)
|
||||
)
|
||||
);
|
||||
INSERT INTO sent_notes_new (
|
||||
|
|
Loading…
Reference in New Issue