Skip to content
This repository has been archived by the owner on Nov 12, 2021. It is now read-only.

Commit

Permalink
✅ [ci] Add CI integration test and boyscout fixes.
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Tale-Yazdi <oliver@perun.network>
  • Loading branch information
ggwpez committed Dec 16, 2020
1 parent 0466df8 commit ab749f8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ jobs:
go build -o op ./cmd/operator
go build -o cl ./cmd/client
- name: Test
- name: Unit Tests
run: go test -timeout 60s ./...

- name: Integration Test
run: go test -tags=integration -timeout 600s -v ./client -run TestWalkthroughs
env:
ERDSTALL_GANACHE_CMD: docker run --rm --net=host trufflesuite/ganache-cli
3 changes: 3 additions & 0 deletions eth/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ func (cl *Client) SubscribeEpochs(ctx context.Context, params tee.Parameters, si
for {
select {
case block := <-sub.Blocks():
if block == nil {
return nil
}
blockSink <- block.NumberU64()
if newEpoch := params.DepositEpoch(block.NumberU64()); newEpoch > oldEpoch {
sink <- newEpoch
Expand Down
2 changes: 2 additions & 0 deletions operator/rpcoperator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package operator

import (
"math/big"
"sync"

"github.com/ethereum/go-ethereum/common"
Expand Down Expand Up @@ -49,6 +50,7 @@ func NewRPCOperator(enclave tee.Enclave) *RPCOperator {
func (o *RPCOperator) Send(tx tee.Transaction) error {
o.mtx.Lock()
defer o.mtx.Unlock()
log.Infof("Sending %d WEI 0x%s…->0x%s…", (*big.Int)(tx.Amount).Uint64(), tx.Sender.Hex()[:5], tx.Recipient.Hex()[:5])
return o.enclave.ProcessTXs(&tx)
}

Expand Down

0 comments on commit ab749f8

Please sign in to comment.