@@ -18,8 +18,8 @@ object BlockDiffer extends ScorexLogging {
18
18
19
19
def right (diff : Diff ): Either [ValidationError , Diff ] = Right (diff)
20
20
21
- def fromBlock (settings : FunctionalitySettings , s : StateReader , pervBlockTimestamp : Option [Long ])(block : Block ): Either [ValidationError , BlockDiff ] =
22
- Signed .validateSignatures(block).flatMap { _ => apply(settings, s, pervBlockTimestamp )(block.feesDistribution, block.timestamp, block.transactionData, 1 ) }
21
+ def fromBlock (settings : FunctionalitySettings , s : StateReader , prevBlockTimestamp : Option [Long ])(block : Block ): Either [ValidationError , BlockDiff ] =
22
+ Signed .validateSignatures(block).flatMap { _ => apply(settings, s, prevBlockTimestamp )(block.feesDistribution, block.timestamp, block.transactionData, 1 ) }
23
23
24
24
def unsafeDiffMany (settings : FunctionalitySettings , s : StateReader , prevBlockTimestamp : Option [Long ])(blocks : Seq [Block ]): BlockDiff =
25
25
blocks.foldLeft((Monoid [BlockDiff ].empty, prevBlockTimestamp)) { case ((diff, prev), block) =>
@@ -29,13 +29,13 @@ object BlockDiffer extends ScorexLogging {
29
29
30
30
private def apply (settings : FunctionalitySettings ,
31
31
s : StateReader ,
32
- pervBlockTimestamp : Option [Long ])(feesDistribution : Diff ,
32
+ prevBlockTimestamp : Option [Long ])(feesDistribution : Diff ,
33
33
timestamp : Long ,
34
34
txs : Seq [ProcessedTransaction ],
35
35
heightDiff : Int ): Either [ValidationError , BlockDiff ] = {
36
36
val currentBlockHeight = s.height + 1
37
37
38
- val txDiffer = TransactionDiffer (settings, pervBlockTimestamp , timestamp, currentBlockHeight) _
38
+ val txDiffer = TransactionDiffer (settings, prevBlockTimestamp , timestamp, currentBlockHeight) _
39
39
40
40
// since we have some in block transactions with status not equal to success
41
41
// we need a much stricter validation about fee charge in later version
0 commit comments