Implement test for sequential address generation #30
1 changed files with 7 additions and 0 deletions
|
@ -476,6 +476,8 @@ main = do
|
||||||
property $ prop_SaplingSpendingKey s
|
property $ prop_SaplingSpendingKey s
|
||||||
it "Sapling receivers are valid" $ \s ->
|
it "Sapling receivers are valid" $ \s ->
|
||||||
property $ prop_SaplingReceiver s
|
property $ prop_SaplingReceiver s
|
||||||
|
it "Sapling receivers are not the same" $ \s ->
|
||||||
|
property $ prop_SaplingRecRepeated s
|
||||||
it "Orchard spending keys are valid" $ \s ->
|
it "Orchard spending keys are valid" $ \s ->
|
||||||
property $ prop_OrchardSpendingKey s
|
property $ prop_OrchardSpendingKey s
|
||||||
it "Orchard receivers are valid" $ \s ->
|
it "Orchard receivers are valid" $ \s ->
|
||||||
|
@ -618,6 +620,11 @@ prop_SaplingReceiver s (NonNegative i) (NonNegative j) =
|
||||||
genSaplingPaymentAddress (fromMaybe "" $ genSaplingSpendingKey s j) i =/=
|
genSaplingPaymentAddress (fromMaybe "" $ genSaplingSpendingKey s j) i =/=
|
||||||
Nothing
|
Nothing
|
||||||
|
|
||||||
|
prop_SaplingRecRepeated :: Seed -> NonNegative Int -> Property
|
||||||
|
prop_SaplingRecRepeated s (NonNegative i) =
|
||||||
|
genSaplingPaymentAddress (fromMaybe "" $ genSaplingSpendingKey s 1) i =/=
|
||||||
|
genSaplingPaymentAddress (fromMaybe "" $ genSaplingSpendingKey s 1) (i + 1)
|
||||||
|
|
||||||
-- | Generators
|
-- | Generators
|
||||||
genOrcArgs :: Gen (CoinType, Int, Int)
|
genOrcArgs :: Gen (CoinType, Int, Int)
|
||||||
genOrcArgs = do
|
genOrcArgs = do
|
||||||
|
|
Loading…
Reference in a new issue