Add a companion function to pushBytesOp that encodes numbers. It handles signs and little-endian conversion by replicating the CScriptNum serialization algorithm.
Depends on D16529
Differential D16531
[ecash-lib] Add `pushNumberOp` to push minimally encoded numbers m4ktub on Jul 24 2024, 00:41. Authored by Tags None Subscribers None
Details
Add a companion function to pushBytesOp that encodes numbers. It handles signs and little-endian conversion by replicating the CScriptNum serialization algorithm. Depends on D16529 npm run test
Diff Detail
Event Timeline
Comment Actions Added inline comments to pushNumberOp after making some variable names more legible. Represent test case numbers in hexadecimal.
Comment Actions Rename function argument to value and move internal bigint down with a different name.
|