Imp api get full-batches

This commit is contained in:
Arnau B
2020-10-30 16:26:33 +01:00
parent 8c15a16dea
commit e0e3299d9f
4 changed files with 70 additions and 19 deletions

View File

@@ -40,6 +40,7 @@ type testCommon struct {
blocks []common.Block
tokens []historydb.TokenWithUSD
batches []testBatch
fullBatches []testFullBatch
coordinators []historydb.CoordinatorAPI
usrAddr string
usrBjj string
@@ -361,10 +362,12 @@ func TestMain(m *testing.M) {
// Set testCommon
usrTxs, allTxs := genTestTxs(sortedTxs, usrIdxs, accs, tokensUSD, blocks)
poolTxsToSend, poolTxsToReceive := genTestPoolTx(accs, []babyjub.PrivateKey{privK}, tokensUSD) // NOTE: pool txs are not inserted to the DB here. In the test they will be posted and getted.
testBatches, fullBatches := genTestBatches(blocks, batches, allTxs)
tc = testCommon{
blocks: blocks,
tokens: tokensUSD,
batches: genTestBatches(blocks, batches),
batches: testBatches,
fullBatches: fullBatches,
coordinators: coordinators,
usrAddr: ethAddrToHez(usrAddr),
usrBjj: bjjToString(usrBjj),