Skip to content

Commit

Permalink
checkSidechainData in nextCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Mar 18, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent d6dccaf commit 9927fd0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/main/scala/sidechain/SidechainHeader.scala
Original file line number Diff line number Diff line change
@@ -259,14 +259,9 @@ object SidechainHeader {
.nextCheck(checkTxProof)
.nextCheck(checkTxId)
.nextCheck(checkSidechainNFT)
.nextCheck()
.nextCheck(checkSidechainData(sh, db))


// todo: fix
validateBeforeSidechainData
.validate(5, checkSidechainData(sh, db).isInstanceOf[Ahead.type], InvalidModifier("" , sh.id, SidechainHeaderModifierTypeId)) // check sidechain data committed in the main-chain

// todo: enforce linearity
// todo: additional checks to enforce linearity
???
}

@@ -277,7 +272,8 @@ object SidechainHeader {

def process(sb: SidechainBlock, db: SidechainDatabase): Unit = {
verify(sb, db) match {
case Valid()
case ValidationResult.Valid(_) => ???
case ValidationResult.Invalid(_) => ???
}
}

0 comments on commit 9927fd0

Please sign in to comment.