Skip to content

Commit

Permalink
Merge pull request #1295 from ergoplatform/v4.0.6
Browse files Browse the repository at this point in the history
Candidate for version 4.0.6
  • Loading branch information
kushti authored Feb 18, 2021
2 parents 6ad1132 + 62f5180 commit 46badc6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.ergoplatform.wallet

import org.ergoplatform.{ErgoAddress, ErgoBox, ErgoBoxCandidate, UnsignedErgoLikeTransaction, UnsignedInput}
import org.ergoplatform.{ErgoAddress, ErgoBox, ErgoBoxCandidate, ErgoScriptPredef, UnsignedErgoLikeTransaction, UnsignedInput}
import scorex.crypto.authds.ADKey
import scorex.util.encode.Base16
import sigmastate.Values.TrueLeaf
import sigmastate.eval.Extensions._
import sigmastate.eval._

Expand Down Expand Up @@ -37,7 +36,7 @@ object Utils {
)
val fee = new ErgoBoxCandidate(
feeAmt,
TrueLeaf.toSigmaProp,
ErgoScriptPredef.feeProposition(),
currentHeight,
Seq.empty[(ErgoBox.TokenId, Long)].toColl,
Map.empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ class ReplaceCompactCollectBoxSelector(maxInputs: Int, optimalInputs: Int) exten

import ReplaceCompactCollectBoxSelector._

val ScanDepthFactor = 10
/**
* Factor which is showing how many input selector is going through to optimize inputs.
* Bigger factor is slowing down inputs selection but minimizing chance of transaction failure.
*/
val ScanDepthFactor = 300

/**
* A method which is selecting boxes to spend in order to collect needed amounts of ergo tokens and assets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import io.circe.syntax._
/**
* Proof of inclusion of certain transactions into a block with known and yet unproven header.
*
* In particular, can be useful for collateralized pools, see [[org.ergoplatform.examples.LiteClientExamples]]
* In particular, can be useful for collateralized pools, see `LiteClientExamples` in tests
* for details. But there are could be more examples where a miner needs to show that a transaction is included
* into upcoming block the miner is working on.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ErgoWallet(historyReader: ErgoHistoryReader, settings: ErgoSettings)
// and also optimal number of inputs(a selector is collecting dust if transaction has less inputs than optimal).
// Now these settings are hard-coded, however, they should be parameterized
// https://github.com/ergoplatform/ergo/issues/856
val maxInputs = 64
val maxInputs = 100
val optimalInputs = 3

val boxSelector = new ReplaceCompactCollectBoxSelector(maxInputs, optimalInputs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class WalletRegistry(store: LDBVersionedStore)(ws: WalletSettings) extends Score


/**
* Read wallet-related boxes with metadata, see [[getBox()]]
* Read wallet-related boxes with metadata, see getBox()
*
* @param ids - box identifier
* @return wallet related boxes (optional result for each box)
Expand Down

0 comments on commit 46badc6

Please sign in to comment.