Closed b-yap closed 2 years ago
But it says in most comments, that it was auto-generated. Is it?
yes. i had to run the npm install and npm build in the autogenerator directory. That's how the type.rs is updated.
@TorstenStueber the code compiled with no problems, even with the updated types.rs.
update: ah, the test did not, however. You are correct, it needs to be updated.
The tests are fixed now.
@ebma Okay, so I got stuck last Friday and partially today, on mapping the slot id, given the
tx_set_hash
from thescpmessage
, and the transactionset which we get fromTxSet(...)
.I followed the hashing function from Stellar Core: https://github.com/stellar/stellar-core/blob/master/src/herder/TxSetFrame.cpp#L180-L190 and temporarily placed it in a helper file https://github.com/pendulum-chain/stellar-experiments/blob/85-collect-and-store-scp-messages-in-vault-client/src/helper.rs#L33-L43
And this function is also called from another function, only if the message type is
isGeneralizedTxSet
... which is something that we don't have. https://github.com/stellar/stellar-core/blob/master/src/herder/TxSetFrame.cpp#L825-L829It's more of a "just in case".