Skip to content

Commit

Permalink
Typo was fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykiselev committed May 19, 2017
1 parent b0b988c commit 2f12ddd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ case class FunctionalitySettings(allowTemporaryNegativeUntil: Long,
allowMakeAssetNameUniqueTransactionAfterTimestamp: Long,
allowMultipleLeaseCancelTransactionUntilTimestamp: Long,
resetEffectiveBalancesAtHeight: Long,
allowTransferLeasedBalanceUntil: Long)
allowLeasedBalanceTransferUntil: Long)

object FunctionalitySettings {
val MAINNET = FunctionalitySettings(allowTemporaryNegativeUntil = 1479168000000L,
Expand All @@ -44,7 +44,7 @@ object FunctionalitySettings {
allowMakeAssetNameUniqueTransactionAfterTimestamp = Long.MaxValue,
allowMultipleLeaseCancelTransactionUntilTimestamp = 1492768800000L,
resetEffectiveBalancesAtHeight = 462000,
allowTransferLeasedBalanceUntil = Long.MaxValue)
allowLeasedBalanceTransferUntil = Long.MaxValue)

val TESTNET = FunctionalitySettings(
allowTemporaryNegativeUntil = 1477958400000L,
Expand All @@ -63,7 +63,7 @@ object FunctionalitySettings {
allowMakeAssetNameUniqueTransactionAfterTimestamp = 1495238400000L,
allowMultipleLeaseCancelTransactionUntilTimestamp = 1492560000000L,
resetEffectiveBalancesAtHeight = 51500,
allowTransferLeasedBalanceUntil = 1495238400000L)
allowLeasedBalanceTransferUntil = 1495238400000L)

val configPath = "waves.blockchain.custom.functionality"

Expand All @@ -84,7 +84,7 @@ object FunctionalitySettings {
allowMakeAssetNameUniqueTransactionAfterTimestamp = config.as[Long](s"$configPath.allow-make-asset-name-unique-transaction-after"),
allowMultipleLeaseCancelTransactionUntilTimestamp = config.as[Long](s"$configPath.allow-multiple-lease-cancel-transaction-until-timestamp"),
resetEffectiveBalancesAtHeight = config.as[Long](s"$configPath.reset-effective-balances-at-height"),
allowTransferLeasedBalanceUntil = config.as[Long](s"$configPath.allow-transfer-leased-balance-until"))
allowLeasedBalanceTransferUntil = config.as[Long](s"$configPath.allow-leased-balance-transfer-until"))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object BalanceDiffValidation {
Some(s"negative asset balance: $acc, old: $oldPortfolio, new: $newPortfolio")
} else if (newPortfolio.effectiveBalance < 0) {
Some(s"negative effective balance: $acc, old: ${leaseWavesInfo(oldPortfolio)}, new: ${leaseWavesInfo(oldPortfolio)}")
} else if (newPortfolio.balance < newPortfolio.leaseInfo.leaseOut && time > fs.allowTransferLeasedBalanceUntil) {
} else if (newPortfolio.balance < newPortfolio.leaseInfo.leaseOut && time > fs.allowLeasedBalanceTransferUntil) {
Some(s"leased being more than own: $acc, old: ${leaseWavesInfo(oldPortfolio)}, new: ${leaseWavesInfo(oldPortfolio)}")
} else None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class BlockchainSettingsSpecification extends FlatSpec with Matchers {
| allow-multiple-lease-cancel-transaction-until-timestamp: 14
| reset-effective-balances-at-height: 15
| allow-make-asset-name-unique-transaction-after: 16
| allow-transfer-leased-balance-until: 17
| allow-leased-balance-transfer-until: 17
| }
| genesis {
| timestamp: 1460678400000
Expand Down Expand Up @@ -76,7 +76,7 @@ class BlockchainSettingsSpecification extends FlatSpec with Matchers {
settings.functionalitySettings.allowMultipleLeaseCancelTransactionUntilTimestamp should be(14)
settings.functionalitySettings.resetEffectiveBalancesAtHeight should be(15)
settings.functionalitySettings.allowMakeAssetNameUniqueTransactionAfterTimestamp should be(16)
settings.functionalitySettings.allowTransferLeasedBalanceUntil should be(17)
settings.functionalitySettings.allowLeasedBalanceTransferUntil should be(17)
settings.genesisSettings.blockTimestamp should be(1460678400000L)
settings.genesisSettings.transactionsTimestamp should be(1460678400000L)
settings.genesisSettings.signature should be("BASE58BLOCKSIGNATURE")
Expand Down Expand Up @@ -124,7 +124,7 @@ class BlockchainSettingsSpecification extends FlatSpec with Matchers {
settings.functionalitySettings.resetEffectiveBalancesAtHeight should be(51500)
settings.functionalitySettings.allowCreateAliasTransactionAfterTimestamp should be(1493596800000L)
settings.functionalitySettings.allowMakeAssetNameUniqueTransactionAfterTimestamp should be(1495238400000L)
settings.functionalitySettings.allowTransferLeasedBalanceUntil should be(1495238400000L)
settings.functionalitySettings.allowLeasedBalanceTransferUntil should be(1495238400000L)
settings.genesisSettings.blockTimestamp should be(1460678400000L)
settings.genesisSettings.transactionsTimestamp should be(1478000000000L)
settings.genesisSettings.signature should be("5uqnLK3Z9eiot6FyYBfwUnbyid3abicQbAZjz38GQ1Q8XigQMxTK4C1zNkqS1SVw7FqSidbZKxWAKLVoEsp4nNqa")
Expand Down Expand Up @@ -172,7 +172,7 @@ class BlockchainSettingsSpecification extends FlatSpec with Matchers {
settings.functionalitySettings.requirePaymentUniqueId should be(1491192000000L)
settings.functionalitySettings.allowExchangeTransactionAfterTimestamp should be(1491192000000L)
settings.functionalitySettings.allowMakeAssetNameUniqueTransactionAfterTimestamp should be(Long.MaxValue)
settings.functionalitySettings.allowTransferLeasedBalanceUntil should be(Long.MaxValue)
settings.functionalitySettings.allowLeasedBalanceTransferUntil should be(Long.MaxValue)
settings.genesisSettings.blockTimestamp should be(1460678400000L)
settings.genesisSettings.transactionsTimestamp should be(1465742577614L)
settings.genesisSettings.signature should be("FSH8eAAzZNqnG8xgTZtz5xuLqXySsXgAjmFEC25hXMbEufiGjqWPnGCZFt6gLiVLJny16ipxRNAkkzjjhqTjBE2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ class BalanceDiffValidationTest extends PropSpec with PropertyChecks with Genera
} yield (genesis, masterTransfersToAlice, aliceLeasesToBob, masterLeasesToAlice, aliceTransfersMoreThanOwnsMinusLeaseOut)


property("can transfer more than own-leaseOut before allow-transfer-leased-balance-until") {
property("can transfer more than own-leaseOut before allow-leased-balance-transfer-until") {
val allowTransferLeasedBalanceUntil = Long.MaxValue / 2
val settings = TestFunctionalitySettings.Enabled.copy(allowTransferLeasedBalanceUntil = allowTransferLeasedBalanceUntil)
val settings = TestFunctionalitySettings.Enabled.copy(allowLeasedBalanceTransferUntil = allowTransferLeasedBalanceUntil)

forAll(ownLessThatLeaseOut, timestampGen retryUntil (_ < allowTransferLeasedBalanceUntil)) {
case ((genesis, masterTransfersToAlice, aliceLeasesToBob, masterLeasesToAlice, aliceTransfersMoreThanOwnsMinusLeaseOut), blockTime) =>
Expand All @@ -89,9 +89,9 @@ class BalanceDiffValidationTest extends PropSpec with PropertyChecks with Genera
}
}

property("cannot transfer more than own-leaseOut after allow-transfer-leased-balance-until") {
property("cannot transfer more than own-leaseOut after allow-leased-balance-transfer-until") {
val allowTransferLeasedBalanceUntil = Long.MaxValue / 2
val settings = TestFunctionalitySettings.Enabled.copy(allowTransferLeasedBalanceUntil = allowTransferLeasedBalanceUntil)
val settings = TestFunctionalitySettings.Enabled.copy(allowLeasedBalanceTransferUntil = allowTransferLeasedBalanceUntil)

forAll(ownLessThatLeaseOut, timestampGen retryUntil (_ > allowTransferLeasedBalanceUntil)) {
case ((genesis, masterTransfersToAlice, aliceLeasesToBob, masterLeasesToAlice, aliceTransfersMoreThanOwnsMinusLeaseOut), blockTime) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ object TestFunctionalitySettings {
allowInvalidReissueInSameBlockUntilTimestamp = 0L, allowCreateAliasTransactionAfterTimestamp = 0L,
allowMultipleLeaseCancelTransactionUntilTimestamp = 0L, resetEffectiveBalancesAtHeight = 0,
allowMakeAssetNameUniqueTransactionAfterTimestamp = 0L,
allowTransferLeasedBalanceUntil = 0L
allowLeasedBalanceTransferUntil = 0L
)
}

0 comments on commit 2f12ddd

Please sign in to comment.