Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
fix: user registry and cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
alok committed Nov 15, 2023
1 parent c48f954 commit 7080bc5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions config/bootnode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ rpc_port: 13524
secret: hello
log_fmt: text
log_level: debug
registry_contract: 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
user_registry_contract: 0x5FbDB2315678afecb367f032d93F642f64180aa3
rpc_endpoint: http://34.215.163.180:8545
3 changes: 2 additions & 1 deletion pkg/contracts/preconf/preconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package preconfcontract

import (
"context"
"errors"
"log/slog"
"math/big"
"strings"
Expand Down Expand Up @@ -93,7 +94,7 @@ func (p *preconfContract) StoreCommitment(
"txnHash", txnHash,
"receipt", receipt,
)
return err
return errors.New("preconf contract storeCommitment receipt error")
}

p.logger.Info("preconf contract storeCommitment successful", "txnHash", txnHash)
Expand Down
3 changes: 3 additions & 0 deletions pkg/preconfirmation/preconfirmation.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ func (p *Preconfirmation) SendBid(
return
}

logger.Info("received preconfirmation", "preConfirmation", preConfirmation)

select {
case preConfirmations <- preConfirmation:
case <-ctx.Done():
Expand Down Expand Up @@ -214,6 +216,7 @@ func (p *Preconfirmation) handleBid(
preConfirmation.Signature,
)
if err != nil {
p.logger.Error("storing commitment", "err", err)
return err
}
return w.WriteMsg(ctx, preConfirmation)
Expand Down

0 comments on commit 7080bc5

Please sign in to comment.