Browse Source

server: The Transaction now requires that its outputs belong to it

prometheus-integration
Alexis Hernandez 6 years ago
parent
commit
a3feadbcf0
  1. 8
      server/app/com/xsn/explorer/models/Transaction.scala

8
server/app/com/xsn/explorer/models/Transaction.scala

@ -6,7 +6,13 @@ case class Transaction(
time: Long,
size: Size,
inputs: List[Transaction.Input],
outputs: List[Transaction.Output])
outputs: List[Transaction.Output]) {
require(
outputs.forall(_.txid == id),
"There are outputs that having a different txid"
)
}
object Transaction {

Loading…
Cancel
Save