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

Test Suite Fails: "Wallet file: xpub check failed, corrupt wallet detected." #8

Open
cadaniluk opened this issue May 9, 2018 · 0 comments

Comments

@cadaniluk
Copy link

cadaniluk commented May 9, 2018

Branch is wallet_new.

Test Log:

PASSED - test_sha_256()
PASSED - test_sha_512()
PASSED - test_sha_hmac()
PASSED - test_utils()
PASSED - test_cstr()
PASSED - test_buffer()
PASSED - test_serialize()
PASSED - test_memory()
PASSED - test_random()
PASSED - test_bitcoin_hash()
PASSED - test_base58check()
PASSED - test_aes()
PASSED - test_bip32()
PASSED - test_ecc()
PASSED - test_vector()
PASSED - test_tx_serialization()
PASSED - test_invalid_tx_deser()
PASSED - test_tx_sign()
PASSED - test_tx_sighash()
PASSED - test_tx_sighash_ext()
PASSED - test_tx_negative_version()
PASSED - test_block_header()
PASSED - test_script_parse()
PASSED - test_script_op_codeseperator()
PASSED - test_eckey()
xpub: tpubDAenfwNu5GyCJWv8oqRAckdKMSUoZjgVF5p8WvQwHQeXjDhAHmGrPa4a4y2Fn7HF2nfCLefJanHV3ny1UY25MRVogizB2zRUdAo7Tr9XAjm
Wallet file: xpub check failed, corrupt wallet detected.
FAILED - test_wallet_basics() - Line 207
	Expect: 	1
	Receive:	0
PASSED - test_wallet()
ext key: xprv9s21ZrQH143K2V8XUg6RatYXYb3jro7W2BKSmRbBSCpfvH4CCtjNKoqNddHkEzVPjV7EYpeNbKGFoSX5v7cEz7sP3Mf4kFSRom8HqRtVKBH
privatekey WIF: L37ZfmLCVAvScHqEnPLcVDjUpdvDEd2vCvBQMZMuByCZhPi39wPq
depth: 0
child index: 0
p2pkh address: 1JJfiq8iyXfzo4GPQX7qzchGGGwqBvAc6A
p2wpkh address: 1JJfiq8iyXfzo4GPQX7qzchGGGwqBvAc6A
pubkey hex: 0322415404243ea5a0d5e771b901923a1931f5d14f8ca5aeb1e971b87bcdab4368
extended pubkey: xpub661MyMwAqRbcEyCzahdRx2VG6ctEGFqMPQF3ZoznzYMeo5PLkS3csc9rUuBthV7r5D4DeJenJuT1FYmxmTXpxeH49gRzSge1W6FhfRY7w8c
PASSED - test_tool()
Connected 0 headers, now at height: 0
Discover peers...done
Start interacting with the p2p network...
PASSED - test_netspv()
PASSED - test_protocol()
DEBUG :Event callback on node 1
DEBUG :Error connecting to node 1.
DEBUG :Trying to connect to 2...
DEBUG :Trying to connect to 3...
DEBUG :Trying to connect to 4...
DEBUG :Connected nodes: 0
DEBUG :Event callback on node 2
DEBUG :Error connecting to node 2.
DEBUG :Connected nodes: 0
DEBUG :Event callback on node 4
DEBUG :Successfull connected to node 4.
DEBUG :sending message to node 4: version
DEBUG :Connected nodes: 1
DEBUG :received command from node 4: version
DEBUG :Connected to node 4: /Satoshi:0.16.99/ (521966)
DEBUG :sending message to node 4: verack
DEBUG :received command from node 4: verack
DEBUG :sending message to node 4: getheaders
DEBUG :received command from node 4: sendheaders
DEBUG :received command from node 4: sendcmpct
DEBUG :received command from node 4: sendcmpct
DEBUG :received command from node 4: ping
DEBUG :sending message to node 4: pong
DEBUG :received command from node 4: addr
DEBUG :received command from node 4: feefilter
DEBUG :received command from node 4: headers
DEBUG :sending message to node 4: getblocks
DEBUG :received command from node 4: inv
DEBUG :sending message to node 4: getdata
DEBUG :received command from node 4: block
DEBUG :Disconnect node 4
PASSED - test_net_basics_plus_download_block()

Note those lines:

Wallet file: xpub check failed, corrupt wallet detected.
FAILED - test_wallet_basics() - Line 207
	Expect: 	1
	Receive:	0

System Spec:
Fedora 27, 64 Bit
uname -r: 4.15.15-300.fc27.x86_64


Seems to be a classic lack of null terminators. fread reads data and strcmp tries to compare them, but strcmp works on strings, which must be null-terminated. Using memcmp or appending null terminators are easy, viable fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant