Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax the constraint and allow for transactions to be replaced. #9

Merged
merged 1 commit into from
Feb 5, 2020

Conversation

gmale
Copy link

@gmale gmale commented Feb 4, 2020

This corresponds to the bug we saw where Brad/Geffen's devices were getting stuck, constantly crashing. Per our discussions, it should be safe to remove this constraint.

@@ -94,8 +94,7 @@ pub fn init_data_database<P: AsRef<Path>>(db_data: P) -> Result<(), Error> {
spent INTEGER,
FOREIGN KEY (tx) REFERENCES transactions(id_tx),
FOREIGN KEY (account) REFERENCES accounts(account),
FOREIGN KEY (spent) REFERENCES transactions(id_tx),
CONSTRAINT tx_output UNIQUE (tx, output_index)
FOREIGN KEY (spent) REFERENCES transactions(id_tx)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still not convinced that this is a correct change, and that there's a bug somewhere else. But if it fixes a known problem then it will do for now.

@str4d str4d merged commit 5d11b41 into str4d:note-spending-v7 Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants