1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 01:18:28 +00:00

fix xpubaddrgen

This commit is contained in:
Pavol Rusnak 2017-04-21 13:53:10 +02:00
parent cfde8ec233
commit fa82ba6d3f
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -5,10 +5,13 @@
#include "bip32.h"
#include "ecdsa.h"
#define VERSION_PUBLIC 0x0488b21e
#define VERSION_PRIVATE 0x0488ade4
void process_job(uint32_t jobid, const char *xpub, uint32_t change, uint32_t from, uint32_t to)
{
HDNode node, child;
if (change > 1 || to <= from || hdnode_deserialize(xpub, &node, NULL) != 0) {
if (change > 1 || to <= from || hdnode_deserialize(xpub, VERSION_PUBLIC, VERSION_PRIVATE, &node, NULL) != 0) {
printf("%d error\n", jobid);
return;
}