-
Notifications
You must be signed in to change notification settings - Fork 2k
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
CHIA-1525 Make PreValidationResult take SpendBundleConditions instead of NPCResult #18647
base: main
Are you sure you want to change the base?
CHIA-1525 Make PreValidationResult take SpendBundleConditions instead of NPCResult #18647
Conversation
44b7508
to
0f7d0e7
Compare
Pull Request Test Coverage Report for Build 11106596781Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
@@ -125,12 +124,12 @@ async def validate_block_body( | |||
get_coin_records: Callable[[Collection[bytes32]], Awaitable[List[CoinRecord]]], | |||
block: Union[FullBlock, UnfinishedBlock], | |||
height: uint32, | |||
npc_result: Optional[NPCResult], | |||
conds: Optional[SpendBundleConditions], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the documentation of this function, below, should be updated as well. and it should say that this must be set for transaction blocks and must be None
for non-transaction blocks
0f7d0e7
to
223d5ff
Compare
Purpose:
PreValidationResult
currently usesNPCResult
without error possibility in this context, so it's simpler to useSpendBundleConditions
directly here.Current Behavior:
PreValidationResult
holdsNPCResult
and its users have logic to get toSpendBundleConditions
from there.New Behavior:
PreValidationResult
holdsSpendBundleConditions
and its users simply leverage that without needing extra logic.