Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
joroshiba committed Jul 31, 2024
1 parent 4e5317d commit b8b8814
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/chain/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func (b *TxBuild) Transfer(ctx context.Context, to string, value *big.Int) (byte
if err != nil {
panic(err)
}
log.Infof("DEBUG: value passed into transfer is %s", value)

amount, err := convertToUint128(value)
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ func (s *Server) consumeQueue() {
defer s.mutex.Unlock()
for len(s.queue) != 0 {
address := <-s.queue
log.Infof("DEBUG: cfg value before transfer from queue is %s", s.cfg.payoutNano)
txHash, err := s.Transfer(context.Background(), address, s.cfg.payoutNano)
log.Infof("DEBUG: cfg value after transfer from queue is %s", s.cfg.payoutNano)
if err != nil {
log.WithError(err).Error("Failed to handle transaction in the queue")
} else {
Expand Down Expand Up @@ -102,7 +104,9 @@ func (s *Server) handleClaim() http.HandlerFunc {

ctx, cancel := context.WithTimeout(r.Context(), 5*time.Second)
defer cancel()
log.Infof("DEBUG: cfg value before transfer from handleClaim is %s", s.cfg.payoutNano)
txHash, err := s.Transfer(ctx, address, s.cfg.payoutNano)
log.Infof("DEBUG: cfg value after transfer from handleClaim is %s", s.cfg.payoutNano)
s.mutex.Unlock()
if err != nil {
log.WithError(err).Error("Failed to send transaction")
Expand Down

0 comments on commit b8b8814

Please sign in to comment.