Esempio n. 1
0
 public static void setRewardRecipientAssignment(Long id, Long recipient) {
   int currentHeight = Nxt.getBlockchain().getLastBlock().getHeight();
   RewardRecipientAssignment assignment = getRewardRecipientAssignment(id);
   if (assignment == null) {
     assignment =
         new RewardRecipientAssignment(
             id,
             id,
             recipient,
             (int) (currentHeight + Constants.BURST_REWARD_RECIPIENT_ASSIGNMENT_WAIT_TIME));
   } else {
     assignment.setRecipient(
         recipient, (int) (currentHeight + Constants.BURST_REWARD_RECIPIENT_ASSIGNMENT_WAIT_TIME));
   }
   rewardRecipientAssignmentTable.insert(assignment);
 }
Esempio n. 2
0
 @Override
 protected void save(Connection con, RewardRecipientAssignment assignment)
     throws SQLException {
   assignment.save(con);
 }