diff --git a/cmd/e2equeries/main.go b/cmd/e2equeries/main.go index a786f97ca..35419e5ef 100644 --- a/cmd/e2equeries/main.go +++ b/cmd/e2equeries/main.go @@ -44,7 +44,12 @@ func main() { rowchan, _ := db.Transactions(context.Background(), rekeyTxnQuery) for txnrow := range rowchan { maybeFail(txnrow.Error, "err rekey txn %v\n", txnrow.Error) - rekeyedAuthAddrs = append(rekeyedAuthAddrs, txnrow.Txn.Txn.RekeyTo) + + t := txnrow.Txn + if txnrow.RootTxn != nil { + t = txnrow.RootTxn + } + rekeyedAuthAddrs = append(rekeyedAuthAddrs, t.Txn.RekeyTo) } // some rekeys get rekeyed back; some rekeyed accounts get deleted, just want to find at least one @@ -63,7 +68,7 @@ func main() { } if !foundRekey { // this will report the error in a handy way - printAccountQuery(db, idb.AccountQueryOptions{EqualToAuthAddr: rekeyedAuthAddrs[0][:], Limit: 1}) + printAccountQuery(db, idb.AccountQueryOptions{EqualToAuthAddr: rekeyedAuthAddrs[0][:], Limit: 0}) } // find an asset with > 1 account diff --git a/misc/buildtestdata.sh b/misc/buildtestdata.sh index cb1655d9f..54f8b4604 100755 --- a/misc/buildtestdata.sh +++ b/misc/buildtestdata.sh @@ -49,4 +49,4 @@ mkdir -p "${E2EDATA}" RSTAMP=$(TZ=UTC python -c 'import time; print("{:08x}".format(0xffffffff - int(time.time() - time.mktime((2020,1,1,0,0,0,-1,-1,-1)))))') echo "COPY AND PASTE THIS TO UPLOAD:" -echo aws s3 cp --acl public-read "${E2EDATA}/net_done.tar.bz2" s3://algorand-testdata/indexer/e2e3/"${RSTAMP}"/net_done.tar.bz2 +echo aws s3 cp --acl public-read "${E2EDATA}/net_done.tar.bz2" s3://algorand-testdata/indexer/e2e4/"${RSTAMP}"/net_done.tar.bz2 diff --git a/misc/e2elive.py b/misc/e2elive.py index 71b11c9ec..327ad1dc5 100644 --- a/misc/e2elive.py +++ b/misc/e2elive.py @@ -59,7 +59,7 @@ def main(): s3 = boto3.client('s3', config=Config(signature_version=UNSIGNED)) tarname = 'net_done.tar.bz2' tarpath = os.path.join(tempdir, tarname) - firstFromS3Prefix(s3, bucket, 'indexer/e2e3', tarname, outpath=tarpath) + firstFromS3Prefix(s3, bucket, 'indexer/e2e4', tarname, outpath=tarpath) source_is_tar = True sourcenet = tarpath tempnet = os.path.join(tempdir, 'net') diff --git a/util/test/testutil.go b/util/test/testutil.go index 759be3e52..d97f731ed 100644 --- a/util/test/testutil.go +++ b/util/test/testutil.go @@ -101,12 +101,14 @@ func PrintTxnQuery(db idb.IndexerDb, q idb.TransactionFilter) { for txnrow := range rowchan { util.MaybeFail(txnrow.Error, "err %v\n", txnrow.Error) stxn := txnrow.Txn - tjs := util.JSONOneLine(stxn.Txn) - info("%d:%d %s sr=%d rr=%d ca=%d cr=%d t=%s\n", txnrow.Round, txnrow.Intra, tjs, stxn.SenderRewards, stxn.ReceiverRewards, stxn.ClosingAmount, stxn.CloseRewards, txnrow.RoundTime.String()) - count++ + if stxn != nil { + tjs := util.JSONOneLine(stxn.Txn) + info("%d:%d %s sr=%d rr=%d ca=%d cr=%d t=%s\n", txnrow.Round, txnrow.Intra, tjs, stxn.SenderRewards, stxn.ReceiverRewards, stxn.ClosingAmount, stxn.CloseRewards, txnrow.RoundTime.String()) + count++ + } } info("%d txns\n", count) - if q.Limit != 0 && q.Limit != count { + if q.Limit != 0 && count < 2 || count > 100 { fmt.Fprintf(os.Stderr, "txn q CAME UP SHORT, limit=%d actual=%d, q=%#v\n", q.Limit, count, q) myStackTrace() exitValue = 1