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

Add support for BYTZ coin #463

Open
olegmitrakhovich opened this issue Jul 30, 2020 · 1 comment
Open

Add support for BYTZ coin #463

olegmitrakhovich opened this issue Jul 30, 2020 · 1 comment

Comments

@olegmitrakhovich
Copy link

olegmitrakhovich commented Jul 30, 2020

I am attempting to make integration tests for a new coin called BYTZ ... when I run make test-integration ARGS="-run=TestIntegration/bytz/" I am getting this:

cd /go/src/github.com/trezor/blockbook && packr clean && packr
cd /go/src/github.com/trezor/blockbook && go test -tags integration go list github.com/trezor/blockbook/tests/... -run=TestIntegration/bytz/
--- FAIL: TestIntegration (0.12s)
--- FAIL: TestIntegration/bytz=main (0.12s)
--- FAIL: TestIntegration/bytz=main/rpc (0.01s)
--- FAIL: TestIntegration/bytz=main/rpc/GetTransaction (0.00s)
rpc.go:185: GetTransaction() got &bchain.Tx{Hex:"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0603392e0d0101ffffffff0100000000000000000000000000", Txid:"64215f794d731e78714de663cdb83e2cf233800e5d4d2cc3d4c235bc4301651f", Version:1, LockTime:0x0, Vin:[]bchain.Vin{bchain.Vin{Coinbase:"03392e0d0101", Txid:"", Vout:0x0, ScriptSig:bchain.ScriptSig{Hex:""}, Sequence:0xffffffff, Addresses:[]string(nil)}}, Vout:[]bchain.Vout{bchain.Vout{ValueSat:big.Int{neg:false, abs:big.nat(nil)}, JsonValue:"", N:0x0, ScriptPubKey:bchain.ScriptPubKey{Hex:"", Addresses:[]string(nil)}}}, BlockHeight:0x0, Confirmations:0x0, Time:1579204856, Blocktime:1579204856, CoinSpecificData:interface {}(nil)}, want &bchain.Tx{Hex:"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0603392e0d0101ffffffff0100000000000000000000000000", Txid:"64215f794d731e78714de663cdb83e2cf233800e5d4d2cc3d4c235bc4301651f", Version:1, LockTime:0x0, Vin:[]bchain.Vin{bchain.Vin{Coinbase:"03392e0d0101", Txid:"", Vout:0x0, ScriptSig:bchain.ScriptSig{Hex:""}, Sequence:0xffffffff, Addresses:[]string(nil)}}, Vout:[]bchain.Vout{bchain.Vout{ValueSat:big.Int{neg:false, abs:big.nat(nil)}, JsonValue:"", N:0x0, ScriptPubKey:bchain.ScriptPubKey{Hex:"", Addresses:[]string(nil)}}}, BlockHeight:0x0, Confirmations:0x45c37, Time:1579204856, Blocktime:1579204856, CoinSpecificData:interface {}(nil)}
FAIL

Not really understanding what the issue is, since I am not getting an error message that makes sense? (the previous error messages were great and very descriptive).

This is the branch I am using https://github.com/bytzcurrency/BYTZ-blockbook/tree/BYTZ-coin-support
and the deployment of the explorer can be found here: https://204.92.235.59:9196/

Any help would be appreciated,
Thank you

@olegmitrakhovich
Copy link
Author

olegmitrakhovich commented Jul 31, 2020

I added: bytzcurrency@1e428b1

"handleFork": {
"syncRanges": [{ "lower": 863801, "upper": 863801 }],
"fakeBlocks": {
"863801": {
"height": 863801,
"hash": "915a2413d358f373be303f242aa92619e6e0eeb16856217140f8749b86acea79"
}
},
"realBlocks": {
"863801": {
"height": 863801,
"hash": "77a84cf0fc3c98eb5b904355eafdf5ab99c0f6f76ee42755874b3e8d7a8d4764"
}
}
}

to sync\testdata\bytz.json and now I am getting more of a descriptive error:

cd /go/src/github.com/trezor/blockbook && packr clean && packr
cd /go/src/github.com/trezor/blockbook && go test -tags integration go list github.com/trezor/blockbook/tests/... -run=TestIntegration/bytz/
E0731 14:57:28.565625 2638 sync.go:299] getBlockWorker 0 connect block error Block not found. Exiting...
--- FAIL: TestIntegration (0.17s)
--- FAIL: TestIntegration/bytz=main (0.17s)
--- FAIL: TestIntegration/bytz=main/rpc (0.01s)
--- FAIL: TestIntegration/bytz=main/rpc/GetTransaction (0.00s)
rpc.go:185: GetTransaction() got &bchain.Tx{Hex:"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0603392e0d0101ffffffff0100000000000000000000000000", Txid:"64215f794d731e78714de663cdb83e2cf233800e5d4d2cc3d4c235bc4301651f", Version:1, LockTime:0x0, Vin:[]bchain.Vin{bchain.Vin{Coinbase:"03392e0d0101", Txid:"", Vout:0x0, ScriptSig:bchain.ScriptSig{Hex:""}, Sequence:0xffffffff, Addresses:[]string(nil)}}, Vout:[]bchain.Vout{bchain.Vout{ValueSat:big.Int{neg:false, abs:big.nat(nil)}, JsonValue:"", N:0x0, ScriptPubKey:bchain.ScriptPubKey{Hex:"", Addresses:[]string(nil)}}}, BlockHeight:0x0, Confirmations:0x0, Time:1579204856, Blocktime:1579204856, CoinSpecificData:interface {}(nil)}, want &bchain.Tx{Hex:"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0603392e0d0101ffffffff0100000000000000000000000000", Txid:"64215f794d731e78714de663cdb83e2cf233800e5d4d2cc3d4c235bc4301651f", Version:1, LockTime:0x0, Vin:[]bchain.Vin{bchain.Vin{Coinbase:"03392e0d0101", Txid:"", Vout:0x0, ScriptSig:bchain.ScriptSig{Hex:""}, Sequence:0xffffffff, Addresses:[]string(nil)}}, Vout:[]bchain.Vout{bchain.Vout{ValueSat:big.Int{neg:false, abs:big.nat(nil)}, JsonValue:"", N:0x0, ScriptPubKey:bchain.ScriptPubKey{Hex:"", Addresses:[]string(nil)}}}, BlockHeight:0x0, Confirmations:0x45c37, Time:1579204856, Blocktime:1579204856, CoinSpecificData:interface {}(nil)}
--- FAIL: TestIntegration/bytz=main/sync (0.14s)
--- FAIL: TestIntegration/bytz=main/sync/HandleFork (0.04s)
handlefork.go:35: Upper block height mismatch: 0 != 863801
FAIL

@olegmitrakhovich olegmitrakhovich changed the title make test-integration ARGS="-run=TestIntegration/bytz/" fails with no proper error message Add support for BYTZ coin Jul 31, 2020
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