Skip to content

Instantly share code, notes, and snippets.

@manjotmona
Last active May 9, 2018 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manjotmona/e08ddd13292c955db5b0981105dad45a to your computer and use it in GitHub Desktop.
Save manjotmona/e08ddd13292c955db5b0981105dad45a to your computer and use it in GitHub Desktop.
trait Block[P <: Proposition, TX <: Transaction[P]]
extends TransactionsCarryingPersistentNodeViewModifier[P, TX] {
def version: Version
def timestamp: Timestamp
}
object Block {
type BlockId = ModifierId
type Timestamp = Long
type Version = Byte
val BlockIdLength: Int = NodeViewModifier.ModifierIdSize
}
trait BlockCompanion[P <: Proposition, TX <: Transaction[P], B <: Block[P, TX]]
extends Serializer[B] {
def isValid(block: B): Boolean
def producers(block: B, history: History[B, _, _]): Seq[P]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment