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

btcutil: reuse serialized tx during TxHash #2023

Commits on Dec 21, 2023

  1. btcutil: reuse serialized tx during TxHash

    btcutil.Block caches the serialized raw bytes of the block during ibd.
    This serialized block bytes includes the serialized tx. The current tx
    hash generation will re-serialized the de-serialized tx to create the
    raw bytes and it'll only then hash that.
    
    This commit changes the code so that the re-serialization never happens,
    saving tons of cpu and memory overhead.
    kcalvinalvin committed Dec 21, 2023
    Configuration menu
    Copy the full SHA
    83605e4 View commit details
    Browse the repository at this point in the history