blockchain.rb
def new_transaction(sender:, recipient:, amount:)
    current_transactions.push(
      'sender' => sender,
      'recipient' => recipient,
      'amount' => amount
    )
    last_block['index'] + 1
  end
# Creates a new transaction to go into the next mined Block
Creates a new transaction to go into the next mined Block
Creates a new transaction to go into the next mined Block
def new_transaction(sender:, recipient:, amount:)
    current_transactions.push(
      'sender' => sender,
      'recipient' => recipient,
      'amount' => amount
    )
    last_block['index'] + 1
  end
def new_transaction ( sender : , recipient : , amount : ) current_transactions . push ( 'sender' => sender , 'recipient' => recipient , 'amount' => amount ) last_block [ 'index' ] + 1 end
Creates a new transaction to go into the next mined Block
Creates a new transaction to go into the next mined Block
sender
recipient
amount