Fix transaction staging
The following works: grpcurl -plaintext -d '{"saplingActivation": 663150,"branchID": "bad", "chainName":"x"}' localhost:9067 cash.z.wallet.sdk.rpc.DarksideStreamer/Reset grpcurl -plaintext -d '{"height":663150,"nonce":5,"count":3}' localhost:9067 cash.z.wallet.sdk.rpc.DarksideStreamer/StageBlocksCreate grpcurl -plaintext -d '{"height":663152,"url":"https://raw.githubusercontent.com/zcash-hackworks/darksidewalletd-test-data/master/transactions/t-shielded-spend"}' localhost:9067 cash.z.wallet.sdk.rpc.DarksideStreamer/StageTransactions grpcurl -plaintext -d '{"height":663152}' localhost:9067 cash.z.wallet.sdk.rpc.DarksideStreamer/ApplyStaged grpcurl -plaintext -d '{"height":663152}' localhost:9067 cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlock (shows the block with one transaction)
This commit is contained in:
parent
7ac1a3f983
commit
2f0b2054ba
|
@ -131,7 +131,6 @@ func setPrevhash() {
|
|||
}
|
||||
copy(blockBytes[4:4+32], prevhash)
|
||||
prevhash = block.GetEncodableHash()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,6 +177,7 @@ func DarksideApplyStaged(height int) error {
|
|||
block[1487]++ // one more transaction
|
||||
block[68]++ // hack HashFinalSaplingRoot to mod the block hash
|
||||
block = append(block, tx.bytes...)
|
||||
state.activeBlocks[tx.height-state.startHeight] = block
|
||||
}
|
||||
setPrevhash()
|
||||
state.latestHeight = height
|
||||
|
|
Loading…
Reference in New Issue