Skip to content

Commit

Permalink
fix: message signature
Browse files Browse the repository at this point in the history
  • Loading branch information
saitofun committed Jun 24, 2024
1 parent fb4fdb8 commit 593bbfa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmd/sequencer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ var (
Blockchain: &blockchain.Blockchain{Contracts: contracts},
MqttBroker: &confmqtt.Broker{},
Database: &database.Postgres{},
PrivateKey: &crypto.EcdsaPrivateKey{Hex: "dbfe03b0406549232b8dccc04be8224fcc0afa300a33d4f335dcfdfead861c85"},
// from sprout default sequencer, to make coordinator validate sequencer signature
PrivateKey: &crypto.EcdsaPrivateKey{
Hex: "dbfe03b0406549232b8dccc04be8224fcc0afa300a33d4f335dcfdfead861c85",
},
}
ctx context.Context
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/modules/event/event_device_confirm.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (e *DeviceConfirm) Handle(ctx context.Context) (err error) {
IMEI: e.imei,
Owner: common.BytesToAddress(e.pkg.GetOwner()).String(),
Timestamp: e.pkg.GetTimestamp(),
Signature: hex.EncodeToString(e.pkg.GetSignature()),
Signature: hex.EncodeToString(append(e.pkg.GetSignature(), byte(0))),
GasLimit: big.NewInt(200000).String(),
DataChannel: uint32(dev.DataChannel),
})),
Expand Down

0 comments on commit 593bbfa

Please sign in to comment.