Skip to content

Commit

Permalink
Fix raw tx parsing: previous tx hash was parsed as BigInt ...
Browse files Browse the repository at this point in the history
  • Loading branch information
KhalilBellakrid committed Jan 4, 2019
1 parent 59dab02 commit 87ef4c6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,10 @@ namespace ledger {
std::vector<BitcoinLikePreparedInput> preparedInputs;
auto inputsCount = reader.readNextVarInt();
for (auto index = 0; index < inputsCount; index++) {
auto previousTxHash = hex::toString(reader.readNextLeBigInt(32).toByteArray());
//Previous Tx Hash in LE
auto prevTxHashBytes = reader.read(32);
std::reverse(prevTxHashBytes.begin(), prevTxHashBytes.end());
auto previousTxHash = hex::toString(prevTxHashBytes);
auto outputIndex = reader.readNextLeUint();

ledger::core::BitcoinLikeBlockchainExplorer::Output output;
Expand Down

0 comments on commit 87ef4c6

Please sign in to comment.