-
Notifications
You must be signed in to change notification settings - Fork 773
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: validating create+transfer might crash the system (#2487)
Solution: if a TRANSFER transaction is validated after a CREATE transaction, the system crashes with `AttributeError: 'NoneType' object has no attribute 'txid'`. This happens because querying `get_spent` checks the attributes `txid` and `output` of `input.fulfills` for every transaction in the current buffer (`current_transactions`). For a CREATE, `input.fulfills` is None, so the check would fail. The solution is to check if `input.fulfills` is defined. If not, then the current transaction cannot spend any output, so we can safely skip it.
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
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