Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zjg555543 committed Jan 4, 2024
1 parent 58cfbb1 commit aefefa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/datacom/datacom.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type DataComEndpoints struct {
privateKey *ecdsa.PrivateKey
sequencerTracker *synchronizer.SequencerTracker

signSequenceAddress common.Address
permitApiAddress common.Address
}

// NewDataComEndpoints returns DataComEndpoints
Expand All @@ -46,10 +46,10 @@ func (d *DataComEndpoints) SignSequence(signedSequence sequence.SignedSequence)
if err != nil || sender.Cmp(common.Address{}) == 0 {
return "0x0", types.NewRPCError(types.DefaultErrorCode, "failed to verify sender")
}
if sender != d.sequencerTracker.GetAddr() && sender != d.signSequenceAddress {
if sender != d.sequencerTracker.GetAddr() && sender != d.permitApiAddress {
return "0x0", types.NewRPCError(types.DefaultErrorCode, "unauthorized")
}
log.Infof("SignSequence, signedSequence sender: %v, sequencerTracker:%v, signSequenceAddress:%s", sender.String(), d.sequencerTracker.GetAddr().String(), d.signSequenceAddress.String())
log.Infof("SignSequence, signedSequence sender: %v, sequencerTracker:%v, permitApiAddress:%s", sender.String(), d.sequencerTracker.GetAddr().String(), d.permitApiAddress.String())

// Store off-chain data by hash (hash(L2Data): L2Data)
_, err = d.txMan.NewDbTxScope(d.db, func(ctx context.Context, dbTx pgx.Tx) (interface{}, types.Error) {
Expand Down

0 comments on commit aefefa6

Please sign in to comment.