QuarkChain / pyquarkchain

Python implementation of QuarkChain
https://quarkchain.io
MIT License
225 stars 114 forks source link

use deduct_value() instead of delta_token_balance() for subtracting tokens #857

Closed qizhou closed 4 years ago

qizhou commented 4 years ago

deduct_value() will check if there is sufficient balance, and thus using deduct_value() with check() will automatically prevent integer underflow.