Skip to content

Commit

Permalink
server: The Transaction now requires that its outputs belong to it
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexITC committed Jan 21, 2019
1 parent 72b66c0 commit a3feadb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/app/com/xsn/explorer/models/Transaction.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down

0 comments on commit a3feadb

Please sign in to comment.