staking-launchpad
staking-launchpad copied to clipboard
compare fork version hex strings
resolves #638 Improves the poor error discussed here and here but does not fully resolve these issues' underlying problem.
The deposit CLI tool assigns a value of eg "01017000" to a deposit file's fork_version. It's a hex string, no leading "0x", cool.
The staking-launchpad uses an env var such as 0x01017000, strips the leading "0x" and loads it into a buffer as hex data. Cool.
But then, it compares the value from our deposit file to this buffer cast to a string. toString() defaults to an ascii string instead of a hex string. Not cool.
Ultimately, we're comparing "��p�" to "01017000", which will cause the launchpad to declare "the network isn't right" when there's actually something else wrong with the deposit file.
Fix is very simple: call toString('hex') instead.
Deploy request for dapper-rolypoly-9814ad pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 0743e6f42494ba35a04b29feb72d766fccdd2523 |