Jianping Wu
d44c783fcc
WIP: Fixed KevaUnchecked locking issue.
6 years ago
Jianping Wu
1aa9fbd044
Fixed keva unit test.
6 years ago
Jianping Wu
37dfb034a6
1. Fixed pending information containing other people's information.
...
2. Fixed keva undo.
6 years ago
Jianping Wu
df20cfc6d2
WIP: implemented keva_delete.
...
Problem: after the call, the corresponding keva coin is gone!
6 years ago
Jianping Wu
ceefe25a87
WIP: Keva mempool test.
6 years ago
Jianping Wu
ce08f141cc
Implemented keva_pending.
6 years ago
Jianping Wu
11c740f549
Cleaned up code - removed dead code from namecoin.
...
Removed lots of legacy checks from namecoin.
6 years ago
Jianping Wu
126f160722
Started working on instant results.
6 years ago
Jianping Wu
6b28595a6f
Fixed namespace/key update checking.
6 years ago
Jianping Wu
17a422025e
Finally everything built!
6 years ago
Jianping Wu
97b35682e0
WIP: main.cpp compiled.
6 years ago
Jianping Wu
d05ab948e2
WIP: tried to compile keva/main.cpp.
6 years ago
Suhas Daftuar
0a22a52918
Use mempool's ancestor sort in transaction selection
...
Transaction selection for mining tracks ancestor feerates that are
modified based on transactions that have already been selected. This
commit de-duplicates the code so that the ancestor feerate sorting used
by the mempool can also be directly applied to the miner.
7 years ago
Suhas Daftuar
9a51319578
Sort mempool by min(feerate, ancestor_feerate)
...
This more closely approximates the desirability of a given transaction for
mining.
7 years ago
Suhas Daftuar
6773f92b30
Refactor CompareTxMemPoolEntryByDescendantScore
7 years ago
Suhas Daftuar
8e617e3708
Remove unused mempool index
7 years ago
Akira Takizawa
595a7bab23
Increment MIT Licence copyright header year on files modified in 2017
7 years ago
Suhas Daftuar
1ec0c0a01c
Make boost::multi_index comparators const
...
This fixes compatibility with boost 1.66
7 years ago
MeshCollider
1a445343f6
scripted-diff: Replace #include "" with #include <> (ryanofsky)
...
-BEGIN VERIFY SCRIPT-
for f in \
src/*.cpp \
src/*.h \
src/bench/*.cpp \
src/bench/*.h \
src/compat/*.cpp \
src/compat/*.h \
src/consensus/*.cpp \
src/consensus/*.h \
src/crypto/*.cpp \
src/crypto/*.h \
src/crypto/ctaes/*.h \
src/policy/*.cpp \
src/policy/*.h \
src/primitives/*.cpp \
src/primitives/*.h \
src/qt/*.cpp \
src/qt/*.h \
src/qt/test/*.cpp \
src/qt/test/*.h \
src/rpc/*.cpp \
src/rpc/*.h \
src/script/*.cpp \
src/script/*.h \
src/support/*.cpp \
src/support/*.h \
src/support/allocators/*.h \
src/test/*.cpp \
src/test/*.h \
src/wallet/*.cpp \
src/wallet/*.h \
src/wallet/test/*.cpp \
src/wallet/test/*.h \
src/zmq/*.cpp \
src/zmq/*.h
do
base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
7 years ago
Matt Corallo
a7d3936de8
Add a CValidationInterface::TransactionRemovedFromMempool
...
This is currently unused, but will by used by wallet to cache when
transactions are in the mempool, obviating the need for calls to
mempool from CWalletTx::InMempool()
7 years ago
Matt Corallo
53a6590f49
Make float <-> int casts explicit outside of test, qt, CFeeRate
7 years ago
donaloconnor
203a4aa31e
Fix CTxMemPoolEntry::UpdateAncestorState: modifySigOps param type int -> int64_t
7 years ago
Dan Raviv
b426e24678
Remove redundant explicitly defined copy ctors
...
CFeeRate and CTxMemPoolEntry have explicitly defined copy ctors which has the same functionality as the implicit default copy ctors which would have been generated otherwise.
Besides being redundant, it violates the rule of three (see https://en.wikipedia.org/wiki/Rule_of_three_(C%2B%2B_programming) ).
(Of course, the rule of three doesn't -really- cause a resource management issue here, but the reason for that is exactly that there is no need for an explicit copy ctor in the first place since no resources are being managed).
CFeeRate has an explicitly defined copy ctor which has the same functionality as the implicit default copy ctor which would h
ave been generated otherwise.
7 years ago
Dan Raviv
5ac072caa2
Fix boost headers included as user instead of system headers
...
In most of the project, boost headers are included as system headers.
Fix the few inconsistent places where they aren't.
7 years ago
practicalswift
64fb0ac016
Declare single-argument (non-converting) constructors "explicit"
...
In order to avoid unintended implicit conversions.
7 years ago
practicalswift
90d4d89230
scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal instead of the macro NULL
...
-BEGIN VERIFY SCRIPT-
sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h
sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp
sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp
sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp
sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp
sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp
-END VERIFY SCRIPT-
7 years ago
practicalswift
6e8c48dc59
Add const to methods that do not modify the object for which it is called
7 years ago
Matt Corallo
381b8fc365
Clarify CCoinsViewMemPool documentation.
...
Thanks to @sdaftuar for correcting my misunderstanding.
8 years ago
Alex Morcos
22378adbe5
Remove no longer used mempool.exists(outpoint)
8 years ago
Pieter Wuille
21180ff734
Simplify return values of GetCoin/HaveCoin(InCache)
...
This removes the possibility for GetCoin/HaveCoin/HaveCoinInCache to return
true while the respective coin is spent. By doing it across all calls, some
extra checks can be eliminated.
coins_tests is modified to call HaveCoin sometimes before and sometimes
after AccessCoin. A further change is needed because the semantics for
GetCoin slightly changed, causing a pruned entry in the parent cache to not
be pulled into the child in FetchCoin.
8 years ago
practicalswift
4087d9ea7c
Remove unnecessary forward class declarations in header files
8 years ago
Pieter Wuille
589827975f
scripted-diff: various renames for per-utxo consistency
...
Thanks to John Newberry for pointing these out.
-BEGIN VERIFY SCRIPT-
sed -i 's/\<GetCoins\>/GetCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<HaveCoins\>/HaveCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<HaveCoinsInCache\>/HaveCoinInCache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<IsPruned\>/IsSpent/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<FetchCoins\>/FetchCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<CoinsEntry\>/CoinEntry/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<vHashTxnToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<vHashTxToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<fHadTxInCache\>/had_coin_in_cache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<coinbaseids\>/coinbase_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<disconnectedids\>/disconnected_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<duplicateids\>/duplicate_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<oldcoins\>/old_coin/g' src/test/coins_tests.cpp
sed -i 's/\<origcoins\>/orig_coin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
-END VERIFY SCRIPT-
8 years ago
Pieter Wuille
5083079688
Switch CCoinsView and chainstate db from per-txid to per-txout
...
This patch makes several related changes:
* Changes the CCoinsView virtual methods (GetCoins, HaveCoins, ...)
to be COutPoint/Coin-based rather than txid/CCoins-based.
* Changes the chainstate db to a new incompatible format that is also
COutPoint/Coin based.
* Implements reconstruction code for hash_serialized_2.
* Adapts the coins_tests unit tests (thanks to Russell Yanofsky).
A side effect of the new CCoinsView model is that we can no longer
use the (unreliable) test for transaction outputs in the UTXO set
to determine whether we already have a particular transaction.
8 years ago
Pieter Wuille
13870b56fc
Replace CCoins-based CTxMemPool::pruneSpent with isSpent
8 years ago
Simone Madeo
4f3782ed67
[doc] Removing comments about dirty entries on txmempool
8 years ago
Suhas Daftuar
acc2e4bc96
Bugfix: PrioritiseTransaction updates the mempool tx counter
...
The mempool's nTransactionsUpdated is used by getblocktemplate
to trigger new invocations of CreateNewBlock().
8 years ago
Russell Yanofsky
c1235e3f2d
Add RecursiveDynamicUsage overload for std::shared_ptr
...
This simplifies a few usage expressions.
8 years ago
Suhas Daftuar
71f1903353
Store disconnected block transactions outside mempool during reorg
...
Rather than re-add disconnected block transactions back to the mempool
immediately, store them in a separate disconnectpool for later processing,
because we expect most such transactions to reappear in the chain that is
still to be connected (and thus we can avoid the work of reprocessing those
transactions through the mempool altogether).
8 years ago
Jorge Timón
381a46e38f
Consensus: Policy: MOVEONLY: Move CFeeRate out of the consensus module
...
...from amount.o to policy/feerate.o
Policy, because it moves policy code to the policy directory (common module)
8 years ago
Alex Morcos
5ba81e54e0
Read and Write fee estimate file directly from CBlockPolicyEstimator
8 years ago
Alex Morcos
14e10aa842
Call estimate(Smart)Fee directly from CBlockPolicyEstimator
8 years ago
Alex Morcos
ae7327b832
Make feeEstimator its own global instance of CBlockPolicyEstimator
8 years ago
practicalswift
97b8213674
Fix parameter naming inconsistencies between .h and .cpp files
...
Inconsistencies prior to this commit:
* serializeFlags vs serialFlags
src/core_io.h:std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
src/core_write.cpp:std::string EncodeHexTx(const CTransaction& tx, const int serialFlags)
* statusOut vs outStatus
src/rpc/server.h:bool RPCIsInWarmup(std::string *statusOut);
src/rpc/server.cpp:bool RPCIsInWarmup(std::string *outStatus)
* hashesToUpdate vs vHashesToUpdate
src/txmempool.h: void UpdateTransactionsFromBlock(const std::vector<uint256> &hashesToUpdate);
src/txmempool.cpp:void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256> &vHashesToUpdate)
* nPruneUpToHeight vs nManualPruneHeight
src/validation.h:void PruneBlockFilesManual(int nPruneUpToHeight);
src/validation.cpp:void PruneBlockFilesManual(int nManualPruneHeight);
8 years ago
Alex Morcos
359e8a03d1
[cleanup] Remove coin age priority completely.
...
Remove GetPriority and ComputePriority. Remove internal machinery for tracking priority in CTxMemPoolEntry.
8 years ago
Alex Morcos
f9b9371c60
[rpc] Remove priorityDelta from prioritisetransaction
...
This a breaking API change to the prioritisetransaction RPC call which previously required exactly three arguments and now requires exactly two (hash and feeDelta). The function prioritiseTransaction is also updated.
8 years ago
Alex Morcos
f838005444
No longer allow "free" transactions
...
Remove -limitfreerelay and always enforce minRelayTxFee in the mempool (except from disconnected blocks)
Remove -relaypriority, the option was only used for the ability to allow free transactions to be relayed regardless of their priority. Both notions no longer apply.
8 years ago
Alex Morcos
fe282acd76
[cleanup] Remove estimatePriority and estimateSmartPriority
...
Unused everywhere now except one test.
8 years ago
Alex Morcos
272b25a6a9
[mining] Remove -blockprioritysize.
...
Remove ability of mining code to fill part of a block with transactions sorted by coin age.
8 years ago
gubatron
eaea2bbb41
Removed redundant parameter from mempool.PrioritiseTransaction
...
(Also made the `const uint256 hash` parameter a `const uint256& hash` as suggested by @sdaftuar )
8 years ago
John Newbery
467df390f0
Remove nonsense #undef foreach
...
This commit removes a preprocessor #undef for a macro that was never
defined. Should make no difference to compiled code.
8 years ago