Skip to content

Validate same-block spend balances#8

Merged
webbananaunite merged 1 commit into
mainfrom
fix/same-block-spend-balance
May 24, 2026
Merged

Validate same-block spend balances#8
webbananaunite merged 1 commit into
mainfrom
fix/same-block-spend-balance

Conversation

@webbananaunite

Copy link
Copy Markdown
Owner

Summary

  • Include already-validated same-block transactions when checking account balance.
  • Validate received blocks sequentially so multiple spends from the same balance are aggregated.
  • Preserve debit, credit, and account fields when serializing and restoring transactions for block validation.
  • Add regression tests for rejecting same-block overspending and allowing spends within balance.

Verification

  • swift test --build-path /Users/yoichi/appOutput/blocks
  • /Users/yoichi/.swiftly/bin/swift build -v --swift-sdk x86_64-swift-linux-musl --build-path /Users/yoichi/appOutput/blocks-linux-musl

@webbananaunite webbananaunite merged commit 4416293 into main May 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant