Skip to content

Commit

Permalink
Fix faucet time usage (#1132)
Browse files Browse the repository at this point in the history
  • Loading branch information
capossele authored Mar 25, 2021
1 parent e7c09a2 commit 7b46446
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/faucet/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (c *Component) splitOutput(remainderOutputID ledgerstate.OutputID, remainde

essence := ledgerstate.NewTransactionEssence(
0,
time.Now(),
clock.SyncedTime(),
local.GetInstance().ID(),
local.GetInstance().ID(),
ledgerstate.NewInputs(inputs...),
Expand Down
2 changes: 0 additions & 2 deletions plugins/faucet/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ func configure(*node.Plugin) {
log.Warnf("couldn't fulfill funding request to %s: %s", addr.Base58(), err)
if errors.Is(err, ErrPrepareFaucet) {
log.Warn(err.Error())
} else {
log.Warnf("couldn't fulfill funding request to %s: %s", addr, err)
}
return
}
Expand Down
5 changes: 5 additions & 0 deletions plugins/messagelayer/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ func configure(plugin *node.Plugin) {
plugin.LogError(err)
}))

Tangle().Parser.Events.MessageRejected.Attach(events.NewClosure(func(rejectedEvent *tangle.MessageRejectedEvent, err error) {
plugin.LogError(err)
plugin.LogError(rejectedEvent.Message)
}))

// read snapshot file
if Parameters.Snapshot.File != "" {
snapshot := ledgerstate.Snapshot{}
Expand Down

0 comments on commit 7b46446

Please sign in to comment.