diff --git a/pkg/core/consensus/maintainer/maintainer.go b/pkg/core/consensus/maintainer/maintainer.go index a16fb8d94..22645b448 100644 --- a/pkg/core/consensus/maintainer/maintainer.go +++ b/pkg/core/consensus/maintainer/maintainer.go @@ -11,6 +11,7 @@ import ( "github.com/dusk-network/dusk-blockchain/pkg/util/nativeutils/eventbus" "github.com/dusk-network/dusk-blockchain/pkg/util/nativeutils/rpcbus" "github.com/dusk-network/dusk-wallet/transactions" + "github.com/dusk-network/dusk-wallet/wallet" log "github.com/sirupsen/logrus" ) @@ -169,5 +170,8 @@ func (m *StakeAutomaton) getTxSettings() (uint64, uint64) { lockTime = transactions.MaxLockTime } + // Convert amount from atomic units to whole units of DUSK + amount = amount * wallet.DUSK + return amount, lockTime } diff --git a/pkg/core/transactor/listener.go b/pkg/core/transactor/listener.go index f416aece0..7f867057a 100644 --- a/pkg/core/transactor/listener.go +++ b/pkg/core/transactor/listener.go @@ -158,7 +158,7 @@ func (t *Transactor) handleGetTxHistory(r rpcbus.Request) error { // Time s.WriteString(time.Unix(record.Timestamp, 0).Format(time.UnixDate) + " / ") // Amount - s.WriteString(fmt.Sprintf("%.8f DUSK ", float64(record.Amount)/float64(wallet.DUSK)) + " / ") + s.WriteString(fmt.Sprintf("%.8f DUSK", float64(record.Amount)/float64(wallet.DUSK)) + " / ") // Unlock height s.WriteString("Unlocks at " + strconv.FormatUint(record.UnlockHeight, 10) + " / ") // Recipient diff --git a/pkg/p2p/peer/router.go b/pkg/p2p/peer/router.go index 8d30dd2e7..a53af75db 100644 --- a/pkg/p2p/peer/router.go +++ b/pkg/p2p/peer/router.go @@ -64,10 +64,7 @@ func (m *messageRouter) route(topic topics.Topic, b *bytes.Buffer) { case topics.MemPool: err = m.dataBroker.SendTxsItems() case topics.Inv: - // We only accept an advertisement once - if m.dupeMap.CanFwd(b) { - err = m.dataRequestor.RequestMissingItems(b) - } + err = m.dataRequestor.RequestMissingItems(b) case topics.Block: err = m.synchronizer.Synchronize(b, m.peerInfo) case topics.Ping: