Guest User

AndoridToken v2 diff

a guest
Aug 7th, 2014
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 73.41 KB | None | 0 0
  1. diff -r Android-Token-V2/.git/config ADTv2-source/.git/config
  2. 10c10
  3. < url = https://github.com/CryptoRepairCrew/Android-Token-V2.git
  4. ---
  5. > url = https://github.com/exchanger/ADTv2-source.git
  6. Files Android-Token-V2/.git/index and ADTv2-source/.git/index differ
  7. diff -r Android-Token-V2/.git/logs/HEAD ADTv2-source/.git/logs/HEAD
  8. 1c1
  9.  
  10. Only in ADTv2-source/.git/objects/pack: pack-1122ce72040b0b1278ee8bac4b933ca4004a259a.idx
  11. Only in ADTv2-source/.git/objects/pack: pack-1122ce72040b0b1278ee8bac4b933ca4004a259a.pack
  12. Only in Android-Token-V2/.git/objects/pack: pack-3e2bbeef50a2add64b98b69c18c2070ec9d923d1.idx
  13. Only in Android-Token-V2/.git/objects/pack: pack-3e2bbeef50a2add64b98b69c18c2070ec9d923d1.pack
  14. diff -r Android-Token-V2/.git/packed-refs ADTv2-source/.git/packed-refs
  15. 2,3c2
  16. < 91406408e8035b786086bdc4a2f083c0f6bcc037 refs/remotes/origin/master
  17. < 91406408e8035b786086bdc4a2f083c0f6bcc037 refs/remotes/origin/v2fork
  18. ---
  19. > 36f2e9be08cf76dd726ddda9cf36becbf7df8bb9 refs/remotes/origin/master
  20. diff -r Android-Token-V2/.git/refs/heads/master ADTv2-source/.git/refs/heads/master
  21. 1c1
  22. < 91406408e8035b786086bdc4a2f083c0f6bcc037
  23. ---
  24. > 36f2e9be08cf76dd726ddda9cf36becbf7df8bb9
  25. Only in ADTv2-source: .gitattributes
  26. Only in ADTv2-source: .gitignore
  27. Only in Android-Token-V2: .travis.yml
  28. Only in Android-Token-V2: COPYING
  29. Only in Android-Token-V2: INSTALL
  30. diff -r Android-Token-V2/androidtoken-qt.pro ADTv2-source/androidtoken-qt.pro
  31. 1,17d0
  32. < # figure out windows
  33. < win32 {
  34. < contains(QMAKE_HOST.arch, x86_64) {
  35. < message("x86_64 64-bit build")
  36. < WINBITS = 64
  37. < } else {
  38. < message("x86 32-bit build")
  39. < WINBITS = 32
  40. < }
  41. < }
  42. < win32 {
  43. < contains(WINBITS, 32) {
  44. < MSYS = MinGW/msys/1.0
  45. < } else {
  46. < MSYS = mingw64/msys
  47. < }
  48. < }
  49. 20c3
  50. < VERSION = 2.0.1.1
  51. ---
  52. > VERSION = 0.7.2
  53. 22,41c5
  54. <
  55. < QT += core gui
  56. <
  57. <
  58. < win32 {
  59. < contains(WINBITS, 32) {
  60. < INCLUDEPATH += C:/$$MSYS/local/include/boost-1_55/
  61. < } else {
  62. < INCLUDEPATH += C:/$$MSYS/local/include/boost-1_55/
  63. < }
  64. < }
  65. < win32:INCLUDEPATH += C:/$$MSYS/local/include
  66. < win32:INCLUDEPATH += C:/$$MSYS/local/ssl/include
  67. <
  68. < win32:contains(WINBITS, 64) {
  69. < INCLUDEPATH += C:/$$MSYS/local/BerkeleyDB.4.8/include
  70. < }
  71. <
  72. < DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE \
  73. < BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN __NO_SYSTEM_INCLUDES
  74. ---
  75. > DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN __NO_SYSTEM_INCLUDES
  76. 44c8
  77. < !macx:CONFIG += static
  78. ---
  79. > #windows:LIBS += -lshlwapi
  80. 46,54c10,21
  81. < # for boost 1.37, add -mt to the boost libraries
  82. < # use: qmake BOOST_LIB_SUFFIX=-mt
  83. < # for boost thread win32 with _win32 sufix
  84. < # use: BOOST_THREAD_LIB_SUFFIX=_win32-...
  85. < # or when linking against a specific BerkelyDB version: BDB_LIB_SUFFIX=-4.8
  86. <
  87. < # Dependency library locations can be customized with:
  88. < # BOOST_INCLUDE_PATH, BOOST_LIB_PATH, BDB_INCLUDE_PATH,
  89. < # BDB_LIB_PATH, OPENSSL_INCLUDE_PATH and OPENSSL_LIB_PATH respectively
  90. ---
  91. > windows:LIBS += -lshlwapi
  92. > LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
  93. > LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
  94. > windows:LIBS += -lws2_32 -lole32 -loleaut32 -luuid -lgdi32
  95. > LIBS += -lboost_system-mgw46-mt-sd-1_53 -lboost_filesystem-mgw46-mt-sd-1_53 -lboost_program_options-mgw46-mt-sd-1_53 -lboost_thread-mgw46-mt-sd-1_53
  96. > BOOST_LIB_SUFFIX=-mgw46-mt-sd-1_53
  97. > BOOST_INCLUDE_PATH=C:/deps/boost
  98. > BOOST_LIB_PATH=C:/deps/boost/stage/lib
  99. > BDB_INCLUDE_PATH=c:/deps/db/build_unix
  100. > BDB_LIB_PATH=c:/deps/db/build_unix
  101. > OPENSSL_INCLUDE_PATH=c:/deps/openssl/include
  102. > OPENSSL_LIB_PATH=c:/deps/openssl
  103. 62,65c29,32
  104. < # Mac: ensure compatibility with at least 10.7, 64 bit
  105. < macx:XXFLAGS += -mmacosx-version-min=10.7 -arch x86_64 \
  106. < -isysroot /Developer/SDKs/MacOSX10.7.sdk
  107. < !win32:!macx {
  108. ---
  109. > # Mac: compile for maximum compatibility (10.5, 32-bit)
  110. > macx:QMAKE_CXXFLAGS += -mmacosx-version-min=10.5 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk
  111. >
  112. > !windows:!macx {
  113. 71,87c38,43
  114. < # OS X is never static
  115. < # macx:mystaticconfig {
  116. < # QMAKE_LIBS_QT =
  117. < # QMAKE_LIBS_QT_THREAD =
  118. < # LIBS += $(QTDIR)/lib/libqt.a -lz -framework Carbon
  119. < # LIBS += /usr/local/lib/libqrencode.3.dylib
  120. < # CONFIG += mystaticconfig
  121. < # }
  122. <
  123. < # bug in gcc 4.4 breaks some pointer code
  124. < # QMAKE_CXXFLAGS += -fno-strict-aliasing
  125. < # bug in gcc 4.4 breaks some pointer code
  126. < # QMAKE_CXXFLAGS += -fno-strict-aliasing
  127. < win32:contains(WINBITS, 32) {
  128. < # can have strict aliasing if opt is 0
  129. < QMAKE_CXXFLAGS_RELEASE -= -O2
  130. < QMAKE_CXXFLAGS_RELEASE += -O0
  131. ---
  132. > !win32 {
  133. > # for extra security against potential buffer overflows: enable GCCs Stack Smashing Protection
  134. > QMAKE_CXXFLAGS *= -fstack-protector-all --param ssp-buffer-size=1
  135. > QMAKE_LFLAGS *= -fstack-protector-all --param ssp-buffer-size=1
  136. > # We need to exclude this for Windows cross compile with MinGW 4.2.x, as it will result in a non-working executable!
  137. > # This can be enabled for Windows, when we switch to MinGW >= 4.4.x.
  138. 88a45,46
  139. > # for extra security on Windows: enable ASLR and DEP via GCC linker flags
  140. > win32:QMAKE_LFLAGS *= -Wl,--dynamicbase -Wl,--nxcompat -static
  141. 90,91d47
  142. <
  143. < USE_QRCODE=1
  144. 97,101d52
  145. < win32:contains(WINBITS, 32) {
  146. < INCLUDEPATH += C:/qrencode-3.4.3
  147. < LIBS += -L"C:/qrencode-3.4.3"
  148. < }
  149. < macx:LIBS += /usr/local/lib/libqrencode.3.dylib
  150. 103,104d53
  151. < } else {
  152. < message(Building without QRCode support)
  153. 107d55
  154. < USE_UPNP=1
  155. 114,130d61
  156. < } else {
  157. < message(Building with UPNP support)
  158. < count(USE_UPNP, 0) {
  159. < USE_UPNP=1
  160. < }
  161. < DEFINES += USE_UPNP=$$USE_UPNP STATICLIB
  162. < win32 {
  163. < contains(WINBITS, 32) {
  164. < INCLUDEPATH += C:/miniupnpc-1.9
  165. < LIBS += -L"C:/miniupnpc-1.9/miniupnpc"
  166. < } else {
  167. < INCLUDEPATH += "C:/$$MSYS/local/miniupnpc-1.9"
  168. < LIBS += -L"C:/$$MSYS/local/miniupnpc-1.9/miniupnpc"
  169. < }
  170. < }
  171. < LIBS += -lminiupnpc
  172. < win32:LIBS += -liphlpapi
  173. 140,143c71,80
  174. < # use: qmake "FIRST_CLASS_MESSAGING=1"
  175. < contains(FIRST_CLASS_MESSAGING, 1) {
  176. < message(Building with first-class messaging)
  177. < DEFINES += FIRST_CLASS_MESSAGING
  178. ---
  179. > # use: qmake "USE_IPV6=1" ( enabled by default; default)
  180. > # or: qmake "USE_IPV6=0" (disabled by default)
  181. > # or: qmake "USE_IPV6=-" (not supported)
  182. > contains(USE_IPV6, -) {
  183. > message(Building without IPv6 support)
  184. > } else {
  185. > count(USE_IPV6, 0) {
  186. > USE_IPV6=1
  187. > }
  188. > DEFINES += USE_IPV6=$$USE_IPV6
  189. 151,161d87
  190. < !win32 {
  191. < # for extra security against potential buffer overflows
  192. < QMAKE_CXXFLAGS += -fstack-protector
  193. < QMAKE_LFLAGS += -fstack-protector
  194. < # do not enable this on windows, as it will result in a non-working executable!
  195. < }
  196. <
  197. < !win32:!macx {
  198. < QMAKE_LFLAGS *= -static
  199. < QMAKE_LFLAGS *= -Wl
  200. < }
  201. 164c90
  202. < !win32|contains(USE_BUILD_INFO, 1) {
  203. ---
  204. > !windows|contains(USE_BUILD_INFO, 1) {
  205. 175c101
  206. < QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter
  207. ---
  208. > QMAKE_CXXFLAGS_WARN_ON = -fdiagnostics-show-option -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wstack-protector
  209. 244c170
  210. < src/protocol.h \
  211. ---
  212. > src/protocol.h \
  213. 252,255c178
  214. < src/clientversion.h\
  215. < src/coincontrol.h\
  216. < src/qt/coincontroldialog.h \
  217. < src/qt/coincontroltreewidget.h
  218. ---
  219. > src/clientversion.h
  220. 258d180
  221. < src/qt/coincontroltreewidget.cpp \
  222. 268,269d189
  223. < src/qt/coincontroldialog.cpp\
  224. < src/coincontrol.h\
  225. 330d249
  226. < src/qt/forms/coincontroldialog.ui \
  227. 379,380c298
  228. < contrib/gitian-descriptors/* doc/*.rst doc/*.txt doc/README README.md res/bitcoin-qt.rc \
  229. < share/setup.nsi
  230. ---
  231. > doc/*.rst doc/*.txt doc/README README.md res/bitcoin-qt.rc src/test/*.cpp src/test/*.h src/qt/test/*.cpp src/qt/test/*.h
  232. 385,391c303
  233. < win32 {
  234. < contains(WINBITS, 32) {
  235. < BOOST_LIB_SUFFIX = -mgw44-mt-d-1_55
  236. < } else {
  237. < BOOST_LIB_SUFFIX = -mgw47-mt-d-1_55
  238. < }
  239. < }
  240. ---
  241. > windows:BOOST_LIB_SUFFIX = -mgw44-mt-s-1_50
  242. 399c311
  243. < macx:BDB_LIB_PATH = /usr/local/BerkeleyDB.4.8/lib
  244. ---
  245. > macx:BDB_LIB_PATH = /opt/local/lib/db48
  246. 407c319
  247. < macx:BDB_INCLUDE_PATH = /usr/local/BerkeleyDB.4.8/include
  248. ---
  249. > macx:BDB_INCLUDE_PATH = /opt/local/include/db48
  250. 418,419c330,331
  251. < win32:DEFINES += WIN32
  252. < win32:RC_FILE = src/qt/res/bitcoin-qt.rc
  253. ---
  254. > windows:DEFINES += WIN32
  255. > windows:RC_FILE = src/qt/res/bitcoin-qt.rc
  256. 421c333
  257. < win32:!contains(MINGW_THREAD_BUGFIX, 0) {
  258. ---
  259. > windows:!contains(MINGW_THREAD_BUGFIX, 0) {
  260. 432c344
  261. < !win32:!macx {
  262. ---
  263. > !windows:!macx {
  264. 442c354
  265. < macx:TARGET = "AndroidTokens2 Qt"
  266. ---
  267. > macx:TARGET = "AndroidsTokensv2-Qt"
  268. 449,460c361
  269. < win32:LIBS += -L"C:/$$MSYS/local/ssl/lib"
  270. < win32:contains(WINBITS, 64) {
  271. < LIBS += -L"C:/$$MSYS/local/BerkeleyDB.4.8/lib"
  272. < LIBS += "C:/mingw64/bin/libwinpthread-1.dll"
  273. < LIBS += "C:/$$MSYS/local/lib/libboost_filesystem-mgw47-mt-d-1_55.dll"
  274. < LIBS += -static
  275. < }
  276. < win32:LIBS += -L"C:/$$MSYS/local/lib"
  277. < # win32:LIBS += "C:/mingw64/x86_64-w64-mingw32/lib/libgcc_s_sjlj-1.dll"
  278. < # win32:LIBS += "C:/mingw64/x86_64-w64-mingw32/lib/libstdc++-6.dll"
  279. < LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) \
  280. < $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
  281. ---
  282. > LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
  283. 463,473c364,366
  284. < win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
  285. < LIBS += -lboost_system$$BOOST_LIB_SUFFIX \
  286. < -lboost_filesystem$$BOOST_LIB_SUFFIX \
  287. < -lboost_program_options$$BOOST_LIB_SUFFIX \
  288. < -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
  289. <
  290. < win32:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
  291. <
  292. < win32:contains(WINBITS, 64) {
  293. < LIBS += -pthread
  294. < }
  295. ---
  296. > windows:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
  297. > LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
  298. > windows:LIBS += -lboost_chrono$$BOOST_LIB_SUFFIX
  299. 476c369
  300. < !win32:!macx {
  301. ---
  302. > !windows:!macx {
  303. 483d375
  304. <
  305. Only in Android-Token-V2/contrib/debian: bin
  306. Only in Android-Token-V2: release
  307. diff -r Android-Token-V2/src/bitcoinrpc.cpp ADTv2-source/src/bitcoinrpc.cpp
  308. 209d208
  309. < { "addnode", &addnode, true, false },
  310. diff -r Android-Token-V2/src/bitcoinrpc.h ADTv2-source/src/bitcoinrpc.h
  311. 137d136
  312. < extern json_spirit::Value addnode(const json_spirit::Array& params, bool fHelp);
  313. diff -r Android-Token-V2/src/checkpoints.cpp ADTv2-source/src/checkpoints.cpp
  314. 27,40c27,40
  315. < ( 0, hashGenesisBlockOfficial )
  316. < ( 1, uint256("0x00000078c8be5ec4c316ef125ec1f610123709afbc3aa3b0d3ed621f49166a71"))
  317. < ( 5, uint256("0x000000100bb01a598795d724a7c8f5e082cf0fc943d6e699d16fd2d9f4547da3"))
  318. < ( 10, uint256("0x0000003d4fadc89263b8cf3eb79a0319e23f428357253f7096aae371cfe7b941"))
  319. < ( 15, uint256("0x000000137b5a7de0d631b89b142d767780d458ded1ff9f65da478370a8db1c28"))
  320. < ( 20, uint256("0x000000311e8f5e8b56f7eef0b00e3c2171dda61a5282e913ba4358d04f335fc0"))
  321. < ( 25, uint256("0x00000075279813a7c0f0e760bc41fc318cb911dc597e357da90d0db1455435e6"))
  322. < ( 10000, uint256("0x0000005464ab3d2a4886c3a28dc61bae83b12e687c357cef77cd5f0445a15798"))
  323. < ( 25000, uint256("0x00000037ed4a5584b27f9d6d598e9e0634b16a42fe36f62f5683a791b4b9f232"))
  324. < ( 52035, uint256("0x0000003bff3166e8658550d62c7c759f78d3785b6765ff440684a52518370ece"))
  325. < ( 55000, uint256("0x76ad9759d5e7f0b3e96876b211109de06ab78078c2e07afdc98ddb1469abfa11"))
  326. < ( 55045, uint256("0x0000005794e1bb87cdd253db71c3b0e22f7cae3331f9d6003a74cf05c737f162"))
  327. < ( 56235, uint256("0x0000007eba6b82ea2a4ec16a47d1fa675c465c711b3cbe915babde8116a4eef1"))
  328. < ( 66000, uint256("0xc0f933748641974cd220c1b5f202facb1834fd34dfedc2ed6d0bdc02e7408c29"))
  329. ---
  330. > ( 0, hashGenesisBlockOfficial )
  331. > ( 1, uint256("0x00000078c8be5ec4c316ef125ec1f610123709afbc3aa3b0d3ed621f49166a71"))
  332. > ( 5, uint256("0x000000100bb01a598795d724a7c8f5e082cf0fc943d6e699d16fd2d9f4547da3"))
  333. > ( 10, uint256("0x0000003d4fadc89263b8cf3eb79a0319e23f428357253f7096aae371cfe7b941"))
  334. > ( 15, uint256("0x000000137b5a7de0d631b89b142d767780d458ded1ff9f65da478370a8db1c28"))
  335. > ( 20, uint256("0x000000311e8f5e8b56f7eef0b00e3c2171dda61a5282e913ba4358d04f335fc0"))
  336. > ( 25, uint256("0x00000075279813a7c0f0e760bc41fc318cb911dc597e357da90d0db1455435e6"))
  337. > ( 10000, uint256("0x0000005464ab3d2a4886c3a28dc61bae83b12e687c357cef77cd5f0445a15798"))
  338. > ( 25000, uint256("0x00000037ed4a5584b27f9d6d598e9e0634b16a42fe36f62f5683a791b4b9f232"))
  339. > ( 52035, uint256("0x0000003bff3166e8658550d62c7c759f78d3785b6765ff440684a52518370ece"))
  340. > ( 55000, uint256("0x76ad9759d5e7f0b3e96876b211109de06ab78078c2e07afdc98ddb1469abfa11"))
  341. > ( 55045, uint256("0x0000005794e1bb87cdd253db71c3b0e22f7cae3331f9d6003a74cf05c737f162"))
  342. > ( 56235, uint256("0x0000007eba6b82ea2a4ec16a47d1fa675c465c711b3cbe915babde8116a4eef1"))
  343. >
  344. 79,81c79,80
  345. < // set a recent default in case broadcasting fails
  346. < uint256 hashSyncCheckpoint = uint256("0xc0f933748641974cd220c1b5f202facb1834fd34dfedc2ed6d0bdc02e7408c29");
  347. < uint256 hashPendingCheckpoint = uint256("0xc0f933748641974cd220c1b5f202facb1834fd34dfedc2ed6d0bdc02e7408c29");
  348. ---
  349. > uint256 hashSyncCheckpoint = 0;
  350. > uint256 hashPendingCheckpoint = 0;
  351. diff -r Android-Token-V2/src/main.cpp ADTv2-source/src/main.cpp
  352. 515c515
  353. < enum GetMinFee_mode mode, unsigned int nBytes) const
  354. ---
  355. > enum GetMinFee_mode mode) const
  356. 519a520
  357. > unsigned int nBytes = ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION);
  358. 635c636
  359. < int64 txMinFee = tx.GetMinFee(1000, false, GMF_RELAY, nSize);
  360. ---
  361. > int64 txMinFee = tx.GetMinFee(1000, false, GMF_RELAY);
  362. 941c942
  363. < int64 nSubsidy = 0 * COIN;
  364. ---
  365. > int64 nSubsidy = 1 * COIN;
  366. 944c945
  367. < nSubsidy = 66800000000 * COIN; // 66,800,000,000 coins
  368. ---
  369. > nSubsidy = 66800000000 * COIN; //
  370. 946,947c947
  371. < nSubsidy = 1 * COIN; // Waste electricity, give devs headaches
  372. <
  373. ---
  374. > nSubsidy = 1 * COIN; // 1 coins per year POW Inflation
  375. 1020c1020
  376. < unsigned int ComputeMinWork(unsigned int nBase, int64 nTime, bool fProofOfStake)
  377. ---
  378. > unsigned int ComputeMinWork(unsigned int nBase, int64 nTime)
  379. 1022,1027c1022
  380. < CBigNum bnTargetLimit;
  381. < if (fProofOfStake) {
  382. < bnTargetLimit = bnProofOfStakeLimit;
  383. < } else {
  384. < bnTargetLimit = bnProofOfWorkLimit;
  385. < }
  386. ---
  387. > CBigNum bnTargetLimit = bnProofOfWorkLimit;
  388. 2059a2055
  389. > CBlockIndex* pindexPrev = pindexBest;
  390. 2238,2242c2234
  391. < bnRequired.SetCompact(ComputeMinWork(
  392. < GetLastBlockIndex(pcheckpoint,
  393. < pblock->IsProofOfStake())->nBits,
  394. < deltaTime,
  395. < pblock->IsProofOfStake()));
  396. ---
  397. > bnRequired.SetCompact(ComputeMinWork(GetLastBlockIndex(pcheckpoint, pblock->IsProofOfStake())->nBits, deltaTime));
  398. 2247,2257c2239
  399. < printf("Too little %s: (%s > %s)\n",
  400. < pblock->IsProofOfStake()? "proof-of-stake" : "proof-of-work",
  401. < bnNewBlock.ToString().c_str(), bnRequired.ToString().c_str());
  402. < printf("Block %s:", hash.ToString().c_str());
  403. < return error("ProcessBlock() : block with too little %s",
  404. < pblock->IsProofOfStake()? "proof-of-stake" : "proof-of-work");
  405. < } else {
  406. < printf("Enough %s: (%s <= %s)\n",
  407. < pblock->IsProofOfStake()? "proof-of-stake" : "proof-of-work",
  408. < bnNewBlock.ToString().c_str(), bnRequired.ToString().c_str());
  409. < printf("Block %s:", hash.ToString().c_str());
  410. ---
  411. > return error("ProcessBlock() : block with too little %s", pblock->IsProofOfStake()? "proof-of-stake" : "proof-of-work");
  412. 3405c3387
  413. < printf("received block %s\n", block.GetHash().ToString().c_str());
  414. ---
  415. > printf("received block %s\n", block.GetHash().ToString().substr(0,20).c_str());
  416. 4354c4336
  417. < while (vNodes.empty() || IsInitialBlockDownload() || (fProofOfStake && vNodes.size() < 3 && nBestHeight < GetNumBlocksOfPeers()))
  418. ---
  419. > while (vNodes.empty() || IsInitialBlockDownload())
  420. diff -r Android-Token-V2/src/main.h ADTv2-source/src/main.h
  421. 122c122
  422. < unsigned int ComputeMinWork(unsigned int nBase, int64 nTime, bool fProofOfStake);
  423. ---
  424. > unsigned int ComputeMinWork(unsigned int nBase, int64 nTime);
  425. 598,601c598
  426. < int64 GetMinFee(unsigned int nBlockSize=1,
  427. < bool fAllowFree=true,
  428. < enum GetMinFee_mode mode=GMF_BLOCK,
  429. < unsigned int nBytes=0) const;
  430. ---
  431. > int64 GetMinFee(unsigned int nBlockSize=1, bool fAllowFree=false, enum GetMinFee_mode mode=GMF_BLOCK) const;
  432. Only in Android-Token-V2/src: obj
  433. diff -r Android-Token-V2/src/qt/bitcoin.cpp ADTv2-source/src/qt/bitcoin.cpp
  434. 86c86
  435. < splashref->showMessage(QString::fromStdString(message), Qt::AlignBottom|Qt::AlignHCenter, QColor(0,0,0));
  436. ---
  437. > splashref->showMessage(QString::fromStdString(message), Qt::AlignBottom|Qt::AlignHCenter, QColor(255,255,200));
  438. diff -r Android-Token-V2/src/qt/bitcoin.qrc ADTv2-source/src/qt/bitcoin.qrc
  439. 46,47c46
  440. < <file alias="splash">res/images/splash2.jpg</file>
  441. < <file alias="backg">res/images/wallet.png</file>
  442. ---
  443. > <file alias="splash">res/images/splash2.png</file>
  444. Only in Android-Token-V2/src/qt: coincontroldialog.cpp
  445. Only in Android-Token-V2/src/qt: coincontroldialog.h
  446. Only in Android-Token-V2/src/qt: coincontroltreewidget.cpp
  447. Only in Android-Token-V2/src/qt: coincontroltreewidget.h
  448. Only in Android-Token-V2/src/qt/forms: coincontroldialog.ui
  449. diff -r Android-Token-V2/src/qt/forms/optionsdialog.ui ADTv2-source/src/qt/forms/optionsdialog.ui
  450. 347,356d346
  451. < <widget class="QCheckBox" name="coinControlFeatures">
  452. < <property name="toolTip">
  453. < <string>Whether to show coin control features or not.</string>
  454. < </property>
  455. < <property name="text">
  456. < <string>Display coin &amp;control features (experts only!)</string>
  457. < </property>
  458. < </widget>
  459. < </item>
  460. < <item>
  461. diff -r Android-Token-V2/src/qt/forms/overviewpage.ui ADTv2-source/src/qt/forms/overviewpage.ui
  462. 229c229
  463. < <height>20</height>
  464. ---
  465. > <height>40</height>
  466. 234,252d233
  467. < <item>
  468. < <widget class="QLabel" name="label_61">
  469. < <property name="text">
  470. < <string/>
  471. < </property>
  472. < <property name="pixmap">
  473. < <pixmap resource="../bitcoin.qrc">:/images/backg</pixmap>
  474. < </property>
  475. < <property name="scaledContents">
  476. < <bool>false</bool>
  477. < </property>
  478. < <property name="alignment">
  479. < <set>Qt::AlignCenter</set>
  480. < </property>
  481. < <property name="margin">
  482. < <number>2</number>
  483. < </property>
  484. < </widget>
  485. < </item>
  486. 340,346d320
  487. < </item>
  488. < <item>
  489. < <widget class="QPushButton" name="unlockWalletButton">
  490. < <property name="text">
  491. < <string>Unlock Wallet</string>
  492. < </property>
  493. < </widget>
  494. diff -r Android-Token-V2/src/qt/forms/sendcoinsdialog.ui ADTv2-source/src/qt/forms/sendcoinsdialog.ui
  495. 9,10c9,10
  496. < <width>850</width>
  497. < <height>400</height>
  498. ---
  499. > <width>686</width>
  500. > <height>217</height>
  501. 16,617c16
  502. < <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
  503. < <property name="bottomMargin">
  504. < <number>8</number>
  505. < </property>
  506. < <item>
  507. < <widget class="QFrame" name="frameCoinControl">
  508. < <property name="sizePolicy">
  509. < <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
  510. < <horstretch>0</horstretch>
  511. < <verstretch>0</verstretch>
  512. < </sizepolicy>
  513. < </property>
  514. < <property name="maximumSize">
  515. < <size>
  516. < <width>16777215</width>
  517. < <height>16777215</height>
  518. < </size>
  519. < </property>
  520. < <property name="frameShape">
  521. < <enum>QFrame::StyledPanel</enum>
  522. < </property>
  523. < <property name="frameShadow">
  524. < <enum>QFrame::Sunken</enum>
  525. < </property>
  526. < <layout class="QVBoxLayout" name="verticalLayoutCoinControl2">
  527. < <property name="spacing">
  528. < <number>-1</number>
  529. < </property>
  530. < <property name="leftMargin">
  531. < <number>0</number>
  532. < </property>
  533. < <property name="topMargin">
  534. < <number>0</number>
  535. < </property>
  536. < <property name="rightMargin">
  537. < <number>0</number>
  538. < </property>
  539. < <property name="bottomMargin">
  540. < <number>6</number>
  541. < </property>
  542. < <item>
  543. < <layout class="QVBoxLayout" name="verticalLayoutCoinControl" stretch="0,0,0,0,1">
  544. < <property name="spacing">
  545. < <number>0</number>
  546. < </property>
  547. < <property name="leftMargin">
  548. < <number>10</number>
  549. < </property>
  550. < <property name="topMargin">
  551. < <number>10</number>
  552. < </property>
  553. < <item>
  554. < <layout class="QHBoxLayout" name="horizontalLayoutCoinControl1">
  555. < <property name="bottomMargin">
  556. < <number>15</number>
  557. < </property>
  558. < <item>
  559. < <widget class="QLabel" name="labelCoinControlFeatures">
  560. < <property name="sizePolicy">
  561. < <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
  562. < <horstretch>0</horstretch>
  563. < <verstretch>0</verstretch>
  564. < </sizepolicy>
  565. < </property>
  566. < <property name="font">
  567. < <font>
  568. < <weight>75</weight>
  569. < <bold>true</bold>
  570. < </font>
  571. < </property>
  572. < <property name="styleSheet">
  573. < <string notr="true">font-weight:bold;</string>
  574. < </property>
  575. < <property name="text">
  576. < <string>Coin Control Features</string>
  577. < </property>
  578. < </widget>
  579. < </item>
  580. < </layout>
  581. < </item>
  582. < <item>
  583. < <layout class="QHBoxLayout" name="horizontalLayoutCoinControl2" stretch="0,0,0,0">
  584. < <property name="spacing">
  585. < <number>8</number>
  586. < </property>
  587. < <property name="bottomMargin">
  588. < <number>10</number>
  589. < </property>
  590. < <item>
  591. < <widget class="QPushButton" name="pushButtonCoinControl">
  592. < <property name="styleSheet">
  593. < <string notr="true"/>
  594. < </property>
  595. < <property name="text">
  596. < <string>Inputs...</string>
  597. < </property>
  598. < </widget>
  599. < </item>
  600. < <item>
  601. < <widget class="QLabel" name="labelCoinControlAutomaticallySelected">
  602. < <property name="text">
  603. < <string>automatically selected</string>
  604. < </property>
  605. < <property name="margin">
  606. < <number>5</number>
  607. < </property>
  608. < </widget>
  609. < </item>
  610. < <item>
  611. < <widget class="QLabel" name="labelCoinControlInsuffFunds">
  612. < <property name="font">
  613. < <font>
  614. < <weight>75</weight>
  615. < <bold>true</bold>
  616. < </font>
  617. < </property>
  618. < <property name="styleSheet">
  619. < <string notr="true">color:red;font-weight:bold;</string>
  620. < </property>
  621. < <property name="text">
  622. < <string>Insufficient funds!</string>
  623. < </property>
  624. < <property name="margin">
  625. < <number>5</number>
  626. < </property>
  627. < </widget>
  628. < </item>
  629. < <item>
  630. < <spacer name="horizontalSpacerCoinControl">
  631. < <property name="orientation">
  632. < <enum>Qt::Horizontal</enum>
  633. < </property>
  634. < <property name="sizeHint" stdset="0">
  635. < <size>
  636. < <width>40</width>
  637. < <height>1</height>
  638. < </size>
  639. < </property>
  640. < </spacer>
  641. < </item>
  642. < </layout>
  643. < </item>
  644. < <item>
  645. < <widget class="QWidget" name="widgetCoinControl" native="true">
  646. < <property name="sizePolicy">
  647. < <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
  648. < <horstretch>0</horstretch>
  649. < <verstretch>0</verstretch>
  650. < </sizepolicy>
  651. < </property>
  652. < <property name="minimumSize">
  653. < <size>
  654. < <width>0</width>
  655. < <height>0</height>
  656. < </size>
  657. < </property>
  658. < <property name="styleSheet">
  659. < <string notr="true"/>
  660. < </property>
  661. < <layout class="QHBoxLayout" name="horizontalLayoutCoinControl5">
  662. < <property name="margin">
  663. < <number>0</number>
  664. < </property>
  665. < <item>
  666. < <layout class="QHBoxLayout" name="horizontalLayoutCoinControl3" stretch="0,0,0,1">
  667. < <property name="spacing">
  668. < <number>20</number>
  669. < </property>
  670. < <property name="topMargin">
  671. < <number>0</number>
  672. < </property>
  673. < <property name="bottomMargin">
  674. < <number>10</number>
  675. < </property>
  676. < <item>
  677. < <layout class="QFormLayout" name="formLayoutCoinControl1">
  678. < <property name="horizontalSpacing">
  679. < <number>10</number>
  680. < </property>
  681. < <property name="verticalSpacing">
  682. < <number>14</number>
  683. < </property>
  684. < <property name="leftMargin">
  685. < <number>10</number>
  686. < </property>
  687. < <property name="topMargin">
  688. < <number>4</number>
  689. < </property>
  690. < <property name="rightMargin">
  691. < <number>6</number>
  692. < </property>
  693. < <item row="0" column="0">
  694. < <widget class="QLabel" name="labelCoinControlQuantityText">
  695. < <property name="styleSheet">
  696. < <string notr="true">font-weight:bold;</string>
  697. < </property>
  698. < <property name="text">
  699. < <string>Quantity:</string>
  700. < </property>
  701. < <property name="margin">
  702. < <number>0</number>
  703. < </property>
  704. < </widget>
  705. < </item>
  706. < <item row="0" column="1">
  707. < <widget class="QLabel" name="labelCoinControlQuantity">
  708. < <property name="font">
  709. < <font>
  710. < <family>Monospace</family>
  711. < <pointsize>10</pointsize>
  712. < </font>
  713. < </property>
  714. < <property name="cursor">
  715. < <cursorShape>IBeamCursor</cursorShape>
  716. < </property>
  717. < <property name="contextMenuPolicy">
  718. < <enum>Qt::ActionsContextMenu</enum>
  719. < </property>
  720. < <property name="text">
  721. < <string>0</string>
  722. < </property>
  723. < <property name="margin">
  724. < <number>0</number>
  725. < </property>
  726. < <property name="textInteractionFlags">
  727. < <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
  728. < </property>
  729. < </widget>
  730. < </item>
  731. < <item row="1" column="0">
  732. < <widget class="QLabel" name="labelCoinControlBytesText">
  733. < <property name="styleSheet">
  734. < <string notr="true">font-weight:bold;</string>
  735. < </property>
  736. < <property name="text">
  737. < <string>Bytes:</string>
  738. < </property>
  739.  
  740. < </widget>
  741. < </item>
  742. < <item row="1" column="1">
  743. < <widget class="QLabel" name="labelCoinControlBytes">
  744. < <property name="font">
  745. < <font>
  746. < <family>Monospace</family>
  747. < <pointsize>10</pointsize>
  748. < </font>
  749. < </property>
  750. < <property name="cursor">
  751. < <cursorShape>IBeamCursor</cursorShape>
  752. < </property>
  753. < <property name="contextMenuPolicy">
  754. < <enum>Qt::ActionsContextMenu</enum>
  755. < </property>
  756. < <property name="text">
  757. < <string>0</string>
  758. < </property>
  759. < <property name="textInteractionFlags">
  760. < <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
  761. < </property>
  762. < </widget>
  763. < </item>
  764. < </layout>
  765. < </item>
  766. < <item>
  767. < <layout class="QFormLayout" name="formLayoutCoinControl2">
  768. < <property name="horizontalSpacing">
  769. < <number>10</number>
  770. < </property>
  771. < <property name="verticalSpacing">
  772. < <number>14</number>
  773. < </property>
  774. < <property name="leftMargin">
  775. < <number>6</number>
  776. < </property>
  777. < <property name="topMargin">
  778. < <number>4</number>
  779. < </property>
  780. < <property name="rightMargin">
  781. < <number>6</number>
  782. < </property>
  783. < <item row="0" column="0">
  784. < <widget class="QLabel" name="labelCoinControlAmountText">
  785. < <property name="styleSheet">
  786. < <string notr="true">font-weight:bold;</string>
  787. < </property>
  788. < <property name="text">
  789. < <string>Amount:</string>
  790. < </property>
  791. < <property name="margin">
  792. < <number>0</number>
  793. < </property>
  794. < </widget>
  795. < </item>
  796. < <item row="0" column="1">
  797. < <widget class="QLabel" name="labelCoinControlAmount">
  798. < <property name="font">
  799. < <font>
  800. < <family>Monospace</family>
  801. < <pointsize>10</pointsize>
  802. < </font>
  803. < </property>
  804. < <property name="cursor">
  805. < <cursorShape>IBeamCursor</cursorShape>
  806. < </property>
  807. < <property name="contextMenuPolicy">
  808. < <enum>Qt::ActionsContextMenu</enum>
  809. < </property>
  810. < <property name="text">
  811. < <string>0.00 BTC</string>
  812. < </property>
  813. < <property name="textInteractionFlags">
  814. < <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
  815. < </property>
  816. < </widget>
  817. < </item>
  818. < <item row="1" column="0">
  819. < <widget class="QLabel" name="labelCoinControlPriorityText">
  820. < <property name="styleSheet">
  821. < <string notr="true">font-weight:bold;</string>
  822. < </property>
  823. < <property name="text">
  824. < <string>Priority:</string>
  825. < </property>
  826. < </widget>
  827. < </item>
  828. < <item row="1" column="1">
  829. < <widget class="QLabel" name="labelCoinControlPriority">
  830. < <property name="font">
  831. < <font>
  832. < <family>Monospace</family>
  833. < <pointsize>10</pointsize>
  834. < </font>
  835. < </property>
  836. < <property name="cursor">
  837. < <cursorShape>IBeamCursor</cursorShape>
  838. < </property>
  839. < <property name="contextMenuPolicy">
  840. < <enum>Qt::ActionsContextMenu</enum>
  841. < </property>
  842. < <property name="text">
  843. < <string>medium</string>
  844. < </property>
  845. < <property name="textInteractionFlags">
  846. < <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
  847. < </property>
  848. < </widget>
  849. < </item>
  850. < </layout>
  851. < </item>
  852. < <item>
  853. < <layout class="QFormLayout" name="formLayoutCoinControl3">
  854. < <property name="horizontalSpacing">
  855. < <number>10</number>
  856. < </property>
  857. < <property name="verticalSpacing">
  858. < <number>14</number>
  859. < </property>
  860. < <property name="leftMargin">
  861. < <number>6</number>
  862. < </property>
  863. < <property name="topMargin">
  864. < <number>4</number>
  865. < </property>
  866. < <property name="rightMargin">
  867. < <number>6</number>
  868. < </property>
  869. < <item row="0" column="0">
  870. < <widget class="QLabel" name="labelCoinControlFeeText">
  871. < <property name="styleSheet">
  872. < <string notr="true">font-weight:bold;</string>
  873. < </property>
  874. < <property name="text">
  875. < <string>Fee:</string>
  876. < </property>
  877. < <property name="margin">
  878. < <number>0</number>
  879. < </property>
  880. < </widget>
  881. < </item>
  882. < <item row="0" column="1">
  883. < <widget class="QLabel" name="labelCoinControlFee">
  884. < <property name="font">
  885. < <font>
  886. < <family>Monospace</family>
  887. < <pointsize>10</pointsize>
  888. < </font>
  889. < </property>
  890. < <property name="cursor">
  891. < <cursorShape>IBeamCursor</cursorShape>
  892. < </property>
  893. < <property name="contextMenuPolicy">
  894. < <enum>Qt::ActionsContextMenu</enum>
  895. < </property>
  896. < <property name="text">
  897. < <string>0.00 BTC</string>
  898. < </property>
  899. < <property name="textInteractionFlags">
  900. < <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
  901. < </property>
  902. < </widget>
  903. < </item>
  904. < <item row="1" column="0">
  905. < <widget class="QLabel" name="labelCoinControlLowOutputText">
  906. < <property name="styleSheet">
  907. < <string notr="true">font-weight:bold;</string>
  908. < </property>
  909. < <property name="text">
  910. < <string>Low Output:</string>
  911. < </property>
  912. < </widget>
  913. < </item>
  914. < <item row="1" column="1">
  915. < <widget class="QLabel" name="labelCoinControlLowOutput">
  916. < <property name="font">
  917. < <font>
  918. < <family>Monospace</family>
  919. < <pointsize>10</pointsize>
  920. < </font>
  921. < </property>
  922. < <property name="cursor">
  923. < <cursorShape>IBeamCursor</cursorShape>
  924. < </property>
  925. < <property name="contextMenuPolicy">
  926. < <enum>Qt::ActionsContextMenu</enum>
  927. < </property>
  928. < <property name="text">
  929. < <string>no</string>
  930. < </property>
  931. < <property name="textInteractionFlags">
  932. < <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
  933. < </property>
  934. < </widget>
  935. < </item>
  936. < </layout>
  937. < </item>
  938. < <item>
  939. < <layout class="QFormLayout" name="formLayoutCoinControl4">
  940. < <property name="horizontalSpacing">
  941. < <number>10</number>
  942. < </property>
  943. < <property name="verticalSpacing">
  944. < <number>14</number>
  945. < </property>
  946. < <property name="leftMargin">
  947. < <number>6</number>
  948. < </property>
  949. < <property name="topMargin">
  950. < <number>4</number>
  951. < </property>
  952. < <property name="rightMargin">
  953. < <number>6</number>
  954. < </property>
  955. < <item row="0" column="0">
  956. < <widget class="QLabel" name="labelCoinControlAfterFeeText">
  957. < <property name="styleSheet">
  958. < <string notr="true">font-weight:bold;</string>
  959. < </property>
  960. < <property name="text">
  961. < <string>After Fee:</string>
  962. < </property>
  963. < <property name="margin">
  964. < <number>0</number>
  965. < </property>
  966. < </widget>
  967. < </item>
  968. < <item row="0" column="1">
  969. < <widget class="QLabel" name="labelCoinControlAfterFee">
  970. < <property name="font">
  971. < <font>
  972. < <family>Monospace</family>
  973. < <pointsize>10</pointsize>
  974. < </font>
  975. < </property>
  976. < <property name="cursor">
  977. < <cursorShape>IBeamCursor</cursorShape>
  978. < </property>
  979. < <property name="contextMenuPolicy">
  980. < <enum>Qt::ActionsContextMenu</enum>
  981. < </property>
  982. < <property name="text">
  983. < <string>0.00 BTC</string>
  984. < </property>
  985. < <property name="textInteractionFlags">
  986. < <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
  987. < </property>
  988. < </widget>
  989. < </item>
  990. < <item row="1" column="0">
  991. < <widget class="QLabel" name="labelCoinControlChangeText">
  992. < <property name="styleSheet">
  993. < <string notr="true">font-weight:bold;</string>
  994. < </property>
  995. < <property name="text">
  996. < <string>Change</string>
  997. < </property>
  998. < </widget>
  999. < </item>
  1000. < <item row="1" column="1">
  1001. < <widget class="QLabel" name="labelCoinControlChange">
  1002. < <property name="font">
  1003. < <font>
  1004. < <family>Monospace</family>
  1005. < <pointsize>10</pointsize>
  1006. < </font>
  1007. < </property>
  1008. < <property name="cursor">
  1009. < <cursorShape>IBeamCursor</cursorShape>
  1010. < </property>
  1011. < <property name="contextMenuPolicy">
  1012. < <enum>Qt::ActionsContextMenu</enum>
  1013. < </property>
  1014. < <property name="text">
  1015. < <string>0.00 BTC</string>
  1016. < </property>
  1017. < <property name="textInteractionFlags">
  1018. < <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
  1019. < </property>
  1020. < </widget>
  1021. < </item>
  1022. < </layout>
  1023. < </item>
  1024. < </layout>
  1025. < </item>
  1026. < </layout>
  1027. < </widget>
  1028. < </item>
  1029. < <item>
  1030. < <layout class="QHBoxLayout" name="horizontalLayoutCoinControl4" stretch="0,0,0">
  1031. < <property name="spacing">
  1032. < <number>12</number>
  1033. < </property>
  1034. < <property name="sizeConstraint">
  1035. < <enum>QLayout::SetDefaultConstraint</enum>
  1036. < </property>
  1037. < <property name="topMargin">
  1038. < <number>5</number>
  1039. < </property>
  1040. < <property name="rightMargin">
  1041. < <number>5</number>
  1042. < </property>
  1043. < <item>
  1044. < <widget class="QCheckBox" name="checkBoxCoinControlChange">
  1045. < <property name="text">
  1046. < <string>custom change address</string>
  1047. < </property>
  1048. < </widget>
  1049. < </item>
  1050. < <item>
  1051. < <widget class="QLineEdit" name="lineEditCoinControlChange">
  1052. < <property name="enabled">
  1053. < <bool>false</bool>
  1054. < </property>
  1055. < <property name="sizePolicy">
  1056. < <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
  1057. < <horstretch>0</horstretch>
  1058. < <verstretch>0</verstretch>
  1059. < </sizepolicy>
  1060. < </property>
  1061. < </widget>
  1062. < </item>
  1063. < <item>
  1064. < <widget class="QLabel" name="labelCoinControlChangeLabel">
  1065. < <property name="sizePolicy">
  1066. < <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
  1067. < <horstretch>0</horstretch>
  1068. < <verstretch>0</verstretch>
  1069. < </sizepolicy>
  1070. < </property>
  1071. < <property name="minimumSize">
  1072. < <size>
  1073. < <width>0</width>
  1074. < <height>0</height>
  1075. < </size>
  1076. < </property>
  1077. < <property name="text">
  1078. < <string/>
  1079. < </property>
  1080. < <property name="margin">
  1081. < <number>3</number>
  1082. < </property>
  1083. < </widget>
  1084. < </item>
  1085. < </layout>
  1086. < </item>
  1087. < <item>
  1088. < <spacer name="verticalSpacerCoinControl">
  1089. < <property name="orientation">
  1090. < <enum>Qt::Vertical</enum>
  1091. < </property>
  1092. < <property name="sizeHint" stdset="0">
  1093. < <size>
  1094. < <width>800</width>
  1095. < <height>1</height>
  1096. < </size>
  1097. < </property>
  1098. < </spacer>
  1099. < </item>
  1100. < </layout>
  1101. < </item>
  1102. < </layout>
  1103. < </widget>
  1104. < </item>
  1105. ---
  1106. > <layout class="QVBoxLayout" name="verticalLayout">
  1107. 628c27
  1108. < <width>830</width>
  1109. ---
  1110. > <width>666</width>
  1111. diff -r Android-Token-V2/src/qt/optionsdialog.cpp ADTv2-source/src/qt/optionsdialog.cpp
  1112. 151d150
  1113. < mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures);
  1114. diff -r Android-Token-V2/src/qt/optionsmodel.cpp ADTv2-source/src/qt/optionsmodel.cpp
  1115. 50d49
  1116. < fCoinControlFeatures = settings.value("fCoinControlFeatures", false).toBool();
  1117. 174,175d172
  1118. < case CoinControlFeatures:
  1119. < return QVariant(fCoinControlFeatures);
  1120. 245d241
  1121. < emit transactionFeeChanged(nTransactionFee);
  1122. 265,270d260
  1123. < case CoinControlFeatures: {
  1124. < fCoinControlFeatures = value.toBool();
  1125. < settings.setValue("fCoinControlFeatures", fCoinControlFeatures);
  1126. < emit coinControlFeaturesChanged(fCoinControlFeatures);
  1127. < }
  1128. < break;
  1129. 284,288d273
  1130. <
  1131. < bool OptionsModel::getCoinControlFeatures()
  1132. < {
  1133. < return fCoinControlFeatures;
  1134. < }
  1135. diff -r Android-Token-V2/src/qt/optionsmodel.h ADTv2-source/src/qt/optionsmodel.h
  1136. 33d32
  1137. < CoinControlFeatures, // bool
  1138. 53d51
  1139. < bool getCoinControlFeatures();
  1140. 61d58
  1141. < bool fCoinControlFeatures;
  1142. 65,66d61
  1143. < void transactionFeeChanged(qint64);
  1144. < void coinControlFeaturesChanged(bool);
  1145. diff -r Android-Token-V2/src/qt/overviewpage.cpp ADTv2-source/src/qt/overviewpage.cpp
  1146. 11d10
  1147. < #include "askpassphrasedialog.h"
  1148. 156,173d154
  1149. < void OverviewPage::unlockWallet()
  1150. < {
  1151. < if(model->getEncryptionStatus() == WalletModel::Locked)
  1152. < {
  1153. < AskPassphraseDialog dlg(AskPassphraseDialog::Unlock, this);
  1154. < dlg.setModel(model);
  1155. < if(dlg.exec() == QDialog::Accepted)
  1156. < {
  1157. < ui->unlockWalletButton->setText(QString("Lock Wallet"));
  1158. < }
  1159. < }
  1160. < else
  1161. < {
  1162. < model->setWalletLocked(true);
  1163. < ui->unlockWalletButton->setText(QString("Unlock Wallet"));
  1164. < }
  1165. < }
  1166. <
  1167. 198,206c179
  1168. <
  1169. < // Unlock wallet button
  1170. < WalletModel::EncryptionStatus status = model->getEncryptionStatus();
  1171. < if(status == WalletModel::Unencrypted)
  1172. < {
  1173. < ui->unlockWalletButton->setDisabled(true);
  1174. < }
  1175. < connect(ui->unlockWalletButton, SIGNAL(clicked()), this, SLOT(unlockWallet()));
  1176. < }
  1177. ---
  1178. > }
  1179. diff -r Android-Token-V2/src/qt/overviewpage.h ADTv2-source/src/qt/overviewpage.h
  1180. 32d31
  1181. < void unlockWallet();
  1182. Only in Android-Token-V2/src/qt/res/icons: bitcoin.icns
  1183. Only in Android-Token-V2/src/qt/res/images: splash2.jpg
  1184. Only in ADTv2-source/src/qt/res/images: splash2.png
  1185. Only in Android-Token-V2/src/qt/res/images: wallet.png
  1186. diff -r Android-Token-V2/src/qt/sendcoinsdialog.cpp ADTv2-source/src/qt/sendcoinsdialog.cpp
  1187. 3d2
  1188. < #include "init.h"
  1189. 5d3
  1190. < #include "addresstablemodel.h"
  1191. 12,13c10
  1192. < #include "coincontrol.h"
  1193. < #include "coincontroldialog.h"
  1194. ---
  1195. > #include "base58.h"
  1196. 19d15
  1197. < #include <QClipboard>
  1198. 34,38d29
  1199. < #if QT_VERSION >= 0x040700
  1200. < /* Do not move this to the XML file, Qt before 4.7 will choke on it */
  1201. < ui->lineEditCoinControlChange->setPlaceholderText(tr("Enter an ADT address (e.g. AcX3L2Z3rKX32nZcnyoZtm8g4efiCyqssd)"));
  1202. < #endif
  1203. <
  1204. 44,75d34
  1205. <
  1206. < // Coin Control
  1207. < ui->lineEditCoinControlChange->setFont(GUIUtil::bitcoinAddressFont());
  1208. < connect(ui->pushButtonCoinControl, SIGNAL(clicked()), this, SLOT(coinControlButtonClicked()));
  1209. < connect(ui->checkBoxCoinControlChange, SIGNAL(stateChanged(int)), this, SLOT(coinControlChangeChecked(int)));
  1210. < connect(ui->lineEditCoinControlChange, SIGNAL(textEdited(const QString &)), this, SLOT(coinControlChangeEdited(const QString &)));
  1211. < // Coin Control: clipboard actions
  1212. < QAction *clipboardQuantityAction = new QAction(tr("Copy quantity"), this);
  1213. < QAction *clipboardAmountAction = new QAction(tr("Copy amount"), this);
  1214. < QAction *clipboardFeeAction = new QAction(tr("Copy fee"), this);
  1215. < QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this);
  1216. < QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this);
  1217. < QAction *clipboardPriorityAction = new QAction(tr("Copy priority"), this);
  1218. < QAction *clipboardLowOutputAction = new QAction(tr("Copy low output"), this);
  1219. < QAction *clipboardChangeAction = new QAction(tr("Copy change"), this);
  1220. < connect(clipboardQuantityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardQuantity()));
  1221. < connect(clipboardAmountAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAmount()));
  1222. < connect(clipboardFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardFee()));
  1223. < connect(clipboardAfterFeeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAfterFee()));
  1224. < connect(clipboardBytesAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardBytes()));
  1225. < connect(clipboardPriorityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardPriority()));
  1226. < connect(clipboardLowOutputAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardLowOutput()));
  1227. < connect(clipboardChangeAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardChange()));
  1228. < ui->labelCoinControlQuantity->addAction(clipboardQuantityAction);
  1229. < ui->labelCoinControlAmount->addAction(clipboardAmountAction);
  1230. < ui->labelCoinControlFee->addAction(clipboardFeeAction);
  1231. < ui->labelCoinControlAfterFee->addAction(clipboardAfterFeeAction);
  1232. < ui->labelCoinControlBytes->addAction(clipboardBytesAction);
  1233. < ui->labelCoinControlPriority->addAction(clipboardPriorityAction);
  1234. < ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction);
  1235. < ui->labelCoinControlChange->addAction(clipboardChangeAction);
  1236. <
  1237. 96,102d54
  1238. <
  1239. < // Coin Control
  1240. < connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(coinControlUpdateLabels()));
  1241. < connect(model->getOptionsModel(), SIGNAL(coinControlFeaturesChanged(bool)), this, SLOT(coinControlFeatureChanged(bool)));
  1242. < connect(model->getOptionsModel(), SIGNAL(transactionFeeChanged(qint64)), this, SLOT(coinControlUpdateLabels()));
  1243. < ui->frameCoinControl->setVisible(model->getOptionsModel()->getCoinControlFeatures());
  1244. < coinControlUpdateLabels();
  1245. 168,173c120
  1246. < WalletModel::SendCoinsReturn sendstatus;
  1247. < if (!model->getOptionsModel() || !model->getOptionsModel()->getCoinControlFeatures())
  1248. < sendstatus = model->sendCoins(recipients);
  1249. < else
  1250. < sendstatus = model->sendCoins(recipients, CoinControlDialog::coinControl);
  1251. <
  1252. ---
  1253. > WalletModel::SendCoinsReturn sendstatus = model->sendCoins(recipients);
  1254. 216,217d162
  1255. < CoinControlDialog::coinControl->UnSelectAll();
  1256. < coinControlUpdateLabels();
  1257. 253d197
  1258. < connect(entry, SIGNAL(payAmountChanged()), this, SLOT(coinControlUpdateLabels()));
  1259. 281,282d224
  1260. <
  1261. < coinControlUpdateLabels();
  1262. 363,515d304
  1263. < }
  1264. < }
  1265. <
  1266. <
  1267. < // Coin Control: copy label "Quantity" to clipboard
  1268. < void SendCoinsDialog::coinControlClipboardQuantity()
  1269. < {
  1270. < QApplication::clipboard()->setText(ui->labelCoinControlQuantity->text());
  1271. < }
  1272. <
  1273. < // Coin Control: copy label "Amount" to clipboard
  1274. < void SendCoinsDialog::coinControlClipboardAmount()
  1275. < {
  1276. < QApplication::clipboard()->setText(ui->labelCoinControlAmount->text().left(ui->labelCoinControlAmount->text().indexOf(" ")));
  1277. < }
  1278. <
  1279. < // Coin Control: copy label "Fee" to clipboard
  1280. < void SendCoinsDialog::coinControlClipboardFee()
  1281. < {
  1282. < QApplication::clipboard()->setText(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")));
  1283. < }
  1284. <
  1285. < // Coin Control: copy label "After fee" to clipboard
  1286. < void SendCoinsDialog::coinControlClipboardAfterFee()
  1287. < {
  1288. < QApplication::clipboard()->setText(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")));
  1289. < }
  1290. <
  1291. < // Coin Control: copy label "Bytes" to clipboard
  1292. < void SendCoinsDialog::coinControlClipboardBytes()
  1293. < {
  1294. < QApplication::clipboard()->setText(ui->labelCoinControlBytes->text());
  1295. < }
  1296. <
  1297. < // Coin Control: copy label "Priority" to clipboard
  1298. < void SendCoinsDialog::coinControlClipboardPriority()
  1299. < {
  1300. < QApplication::clipboard()->setText(ui->labelCoinControlPriority->text());
  1301. < }
  1302. <
  1303. < // Coin Control: copy label "Low output" to clipboard
  1304. < void SendCoinsDialog::coinControlClipboardLowOutput()
  1305. < {
  1306. < QApplication::clipboard()->setText(ui->labelCoinControlLowOutput->text());
  1307. < }
  1308. <
  1309. < // Coin Control: copy label "Change" to clipboard
  1310. < void SendCoinsDialog::coinControlClipboardChange()
  1311. < {
  1312. < QApplication::clipboard()->setText(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")));
  1313. < }
  1314. <
  1315. < // Coin Control: settings menu - coin control enabled/disabled by user
  1316. < void SendCoinsDialog::coinControlFeatureChanged(bool checked)
  1317. < {
  1318. < ui->frameCoinControl->setVisible(checked);
  1319. <
  1320. < if (!checked && model) // coin control features disabled
  1321. < CoinControlDialog::coinControl->SetNull();
  1322. < }
  1323. <
  1324. < // Coin Control: button inputs -> show actual coin control dialog
  1325. < void SendCoinsDialog::coinControlButtonClicked()
  1326. < {
  1327. < CoinControlDialog dlg;
  1328. < dlg.setModel(model);
  1329. < dlg.exec();
  1330. < coinControlUpdateLabels();
  1331. < }
  1332. <
  1333. < // Coin Control: checkbox custom change address
  1334. < void SendCoinsDialog::coinControlChangeChecked(int state)
  1335. < {
  1336. < if (model)
  1337. < {
  1338. < if (state == Qt::Checked)
  1339. < CoinControlDialog::coinControl->destChange = CBitcoinAddress(ui->lineEditCoinControlChange->text().toStdString()).Get();
  1340. < else
  1341. < CoinControlDialog::coinControl->destChange = CNoDestination();
  1342. < }
  1343. <
  1344. < ui->lineEditCoinControlChange->setEnabled((state == Qt::Checked));
  1345. < ui->labelCoinControlChangeLabel->setEnabled((state == Qt::Checked));
  1346. < }
  1347. <
  1348. < // Coin Control: custom change address changed
  1349. < void SendCoinsDialog::coinControlChangeEdited(const QString & text)
  1350. < {
  1351. < if (model)
  1352. < {
  1353. < CoinControlDialog::coinControl->destChange = CBitcoinAddress(text.toStdString()).Get();
  1354. <
  1355. < // label for the change address
  1356. < ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}");
  1357. < if (text.isEmpty())
  1358. < ui->labelCoinControlChangeLabel->setText("");
  1359. < else if (!CBitcoinAddress(text.toStdString()).IsValid())
  1360. < {
  1361. < ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
  1362. < ui->labelCoinControlChangeLabel->setText(tr("WARNING: Invalid ADT address"));
  1363. < }
  1364. < else
  1365. < {
  1366. < QString associatedLabel = model->getAddressTableModel()->labelForAddress(text);
  1367. < if (!associatedLabel.isEmpty())
  1368. < ui->labelCoinControlChangeLabel->setText(associatedLabel);
  1369. < else
  1370. < {
  1371. < CPubKey pubkey;
  1372. < CKeyID keyid;
  1373. < CBitcoinAddress(text.toStdString()).GetKeyID(keyid);
  1374. < if (model->getPubKey(keyid, pubkey))
  1375. < ui->labelCoinControlChangeLabel->setText(tr("(no label)"));
  1376. < else
  1377. < {
  1378. < ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:red;}");
  1379. < ui->labelCoinControlChangeLabel->setText(tr("WARNING: unknown change address"));
  1380. < }
  1381. < }
  1382. < }
  1383. < }
  1384. < }
  1385. <
  1386. < // Coin Control: update labels
  1387. < void SendCoinsDialog::coinControlUpdateLabels()
  1388. < {
  1389. < if (!model || !model->getOptionsModel() || !model->getOptionsModel()->getCoinControlFeatures())
  1390. < return;
  1391. <
  1392. < // set pay amounts
  1393. < CoinControlDialog::payAmounts.clear();
  1394. < for(int i = 0; i < ui->entries->count(); ++i)
  1395. < {
  1396. < SendCoinsEntry *entry = qobject_cast<SendCoinsEntry*>(ui->entries->itemAt(i)->widget());
  1397. < if(entry)
  1398. < CoinControlDialog::payAmounts.append(entry->getValue().amount);
  1399. < }
  1400. <
  1401. < if (CoinControlDialog::coinControl->HasSelected())
  1402. < {
  1403. < // actual coin control calculation
  1404. < CoinControlDialog::updateLabels(model, this);
  1405. <
  1406. < // show coin control stats
  1407. < ui->labelCoinControlAutomaticallySelected->hide();
  1408. < ui->widgetCoinControl->show();
  1409. < }
  1410. < else
  1411. < {
  1412. < // hide coin control stats
  1413. < ui->labelCoinControlAutomaticallySelected->show();
  1414. < ui->widgetCoinControl->hide();
  1415. < ui->labelCoinControlInsuffFunds->hide();
  1416. diff -r Android-Token-V2/src/qt/sendcoinsdialog.h ADTv2-source/src/qt/sendcoinsdialog.h
  1417. 5d4
  1418. < #include <QString>
  1419. 53,65d51
  1420. < void coinControlFeatureChanged(bool);
  1421. < void coinControlButtonClicked();
  1422. < void coinControlChangeChecked(int);
  1423. < void coinControlChangeEdited(const QString &);
  1424. < void coinControlUpdateLabels();
  1425. < void coinControlClipboardQuantity();
  1426. < void coinControlClipboardAmount();
  1427. < void coinControlClipboardFee();
  1428. < void coinControlClipboardAfterFee();
  1429. < void coinControlClipboardBytes();
  1430. < void coinControlClipboardPriority();
  1431. < void coinControlClipboardLowOutput();
  1432. < void coinControlClipboardChange();
  1433. diff -r Android-Token-V2/src/qt/sendcoinsentry.cpp ADTv2-source/src/qt/sendcoinsentry.cpp
  1434. 75,76d74
  1435. < connect(ui->payAmount, SIGNAL(textChanged()), this, SIGNAL(payAmountChanged()));
  1436. <
  1437. diff -r Android-Token-V2/src/qt/sendcoinsentry.h ADTv2-source/src/qt/sendcoinsentry.h
  1438. 42d41
  1439. < void payAmountChanged();
  1440. diff -r Android-Token-V2/src/qt/walletmodel.cpp ADTv2-source/src/qt/walletmodel.cpp
  1441. 132,133c132
  1442. < WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipient> &recipients,
  1443. < const CCoinControl *coinControl)
  1444. ---
  1445. > WalletModel::SendCoinsReturn WalletModel::sendCoins(const QList<SendCoinsRecipient> &recipients)
  1446. 165,172c164
  1447. < // we do not use getBalance() here, because some coins could be locked or coin control could be active
  1448. < int64 nBalance = 0;
  1449. < std::vector<COutput> vCoins;
  1450. < wallet->AvailableCoins(vCoins, true, coinControl);
  1451. < BOOST_FOREACH(const COutput& out, vCoins)
  1452. < nBalance += out.tx->vout[out.i].nValue;
  1453. <
  1454. < if(total > nBalance)
  1455. ---
  1456. > if(total > getBalance())
  1457. 177c169
  1458. < if((total + nTransactionFee) > nBalance)
  1459. ---
  1460. > if((total + nTransactionFee) > getBalance())
  1461. 197c189
  1462. < bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, coinControl);
  1463.  
  1464. ---
  1465. > bool fCreated = wallet->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired);
  1466. 201c193
  1467. < if((total + nFeeRequired) > nBalance)
  1468. ---
  1469. > if((total + nFeeRequired) > wallet->GetBalance())
  1470. 391,458d382
  1471. < }
  1472. <
  1473. < bool WalletModel::getPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const
  1474. < {
  1475. < return wallet->GetPubKey(address, vchPubKeyOut);
  1476. < }
  1477. <
  1478. < // returns a list of COutputs from COutPoints
  1479. < void WalletModel::getOutputs(const std::vector<COutPoint>& vOutpoints, std::vector<COutput>& vOutputs)
  1480. < {
  1481. < BOOST_FOREACH(const COutPoint& outpoint, vOutpoints)
  1482. < {
  1483. < if (!wallet->mapWallet.count(outpoint.hash)) continue;
  1484. < COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, wallet->mapWallet[outpoint.hash].GetDepthInMainChain());
  1485. < vOutputs.push_back(out);
  1486. < }
  1487. < }
  1488. <
  1489. < // AvailableCoins + LockedCoins grouped by wallet address (put change in one group with wallet address)
  1490. < void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins) const
  1491. < {
  1492. < std::vector<COutput> vCoins;
  1493. < wallet->AvailableCoins(vCoins);
  1494. <
  1495. < std::vector<COutPoint> vLockedCoins;
  1496. <
  1497. < // add locked coins
  1498. < BOOST_FOREACH(const COutPoint& outpoint, vLockedCoins)
  1499. < {
  1500. < if (!wallet->mapWallet.count(outpoint.hash)) continue;
  1501. < COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, wallet->mapWallet[outpoint.hash].GetDepthInMainChain());
  1502. < vCoins.push_back(out);
  1503. < }
  1504. <
  1505. < BOOST_FOREACH(const COutput& out, vCoins)
  1506. < {
  1507. < COutput cout = out;
  1508. <
  1509. < while (wallet->IsChange(cout.tx->vout[cout.i]) && cout.tx->vin.size() > 0 && wallet->IsMine(cout.tx->vin[0]))
  1510. < {
  1511. < if (!wallet->mapWallet.count(cout.tx->vin[0].prevout.hash)) break;
  1512. < cout = COutput(&wallet->mapWallet[cout.tx->vin[0].prevout.hash], cout.tx->vin[0].prevout.n, 0);
  1513. < }
  1514. <
  1515. < CTxDestination address;
  1516. < if(!ExtractDestination(cout.tx->vout[cout.i].scriptPubKey, address)) continue;
  1517. < mapCoins[CBitcoinAddress(address).ToString().c_str()].push_back(out);
  1518. < }
  1519. < }
  1520. <
  1521. < bool WalletModel::isLockedCoin(uint256 hash, unsigned int n) const
  1522. < {
  1523. < return false;
  1524. < }
  1525. <
  1526. < void WalletModel::lockCoin(COutPoint& output)
  1527. < {
  1528. < return;
  1529. < }
  1530. <
  1531. < void WalletModel::unlockCoin(COutPoint& output)
  1532. < {
  1533. < return;
  1534. < }
  1535. <
  1536. < void WalletModel::listLockedCoins(std::vector<COutPoint>& vOutpts)
  1537. < {
  1538. < return;
  1539. diff -r Android-Token-V2/src/qt/walletmodel.h ADTv2-source/src/qt/walletmodel.h
  1540. 5,6d4
  1541. < #include <vector>
  1542. < #include <map>
  1543. 14,19d11
  1544. < class CKeyID;
  1545. < class CPubKey;
  1546. < class COutput;
  1547. < class COutPoint;
  1548. < class uint256;
  1549. < class CCoinControl;
  1550. 36a29
  1551. >
  1552. 78c71
  1553. < SendCoinsReturn(StatusCode status=Aborted,
  1554. ---
  1555. > SendCoinsReturn(StatusCode status,
  1556. 88,89c81
  1557. < SendCoinsReturn sendCoins(const QList<SendCoinsRecipient> &recipients,
  1558. < const CCoinControl *coinControl=NULL);
  1559. ---
  1560. > SendCoinsReturn sendCoins(const QList<SendCoinsRecipient> &recipients);
  1561. 121,130d112
  1562. <
  1563. < bool getPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const;
  1564. < void getOutputs(const std::vector<COutPoint>& vOutpoints, std::vector<COutput>& vOutputs);
  1565. < void listCoins(std::map<QString, std::vector<COutput> >& mapCoins) const;
  1566. <
  1567. < bool isLockedCoin(uint256 hash, unsigned int n) const;
  1568. < void lockCoin(COutPoint& output);
  1569. < void unlockCoin(COutPoint& output);
  1570. < void listLockedCoins(std::vector<COutPoint>& vOutpts);
  1571. <
  1572. 184d165
  1573. <
  1574. diff -r Android-Token-V2/src/rpcnet.cpp ADTv2-source/src/rpcnet.cpp
  1575. 72,90d71
  1576. < Value addnode(const Array& params, bool fHelp)
  1577. <
  1578. < {
  1579. < string strCommand;
  1580. < if (fHelp || params.size() != 1)
  1581. < throw runtime_error(
  1582. < "addnode <node>\n"
  1583. < "Attempts to try a connection to a node once.\n"
  1584. < "\nExample:\n"
  1585. < "addnode 192.168.0.6:8333"
  1586. < );
  1587. <
  1588. < string strNode = params[0].get_str();
  1589. <
  1590. < CAddress addr;
  1591. < ConnectNode(addr, strNode.c_str());
  1592. < return Value::null;
  1593. < }
  1594. <
  1595. diff -r Android-Token-V2/src/scrypt_mine.h ADTv2-source/src/scrypt_mine.h
  1596. 24,26c24,26
  1597. < unsigned int scanhash_scrypt(block_header *pdata, void *scratchbuf,
  1598. < uint32_t max_nonce, uint32_t &hash_count,
  1599. < void *result, block_header *res_header);
  1600. ---
  1601. > unsigned int scanhash_scrypt(block_header *pdata, void *scratchbuf,
  1602. > uint32_t max_nonce, uint32_t &hash_count,
  1603. > void *result, block_header *res_header);
  1604. diff -r Android-Token-V2/src/version.cpp ADTv2-source/src/version.cpp
  1605. 41c41
  1606. < # define GIT_COMMIT_DATE "$Format:%cD"
  1607. ---
  1608. > # define GIT_COMMIT_DATE "May-2014"
  1609. diff -r Android-Token-V2/src/version.h ADTv2-source/src/version.h
  1610. 28c28
  1611. < static const int PROTOCOL_VERSION = 60006;
  1612. ---
  1613. > static const int PROTOCOL_VERSION = 60007;
  1614. 39c39
  1615. < static const int NOBLKS_VERSION_END = 60004;
  1616. ---
  1617. > static const int NOBLKS_VERSION_END = 60005;
  1618. 42c42
  1619. < static const int BIP0031_VERSION = 60000;
  1620. ---
  1621. > static const int BIP0031_VERSION = 60005;
  1622. 47c47
  1623. < #define DISPLAY_VERSION_MAJOR 2
  1624. ---
  1625. > #define DISPLAY_VERSION_MAJOR 3
  1626. 49,50c49,50
  1627. < #define DISPLAY_VERSION_REVISION 1
  1628. < #define DISPLAY_VERSION_BUILD 1
  1629. ---
  1630. > #define DISPLAY_VERSION_REVISION 0
  1631. > #define DISPLAY_VERSION_BUILD 0
  1632. diff -r Android-Token-V2/src/wallet.cpp ADTv2-source/src/wallet.cpp
  1633. 11d10
  1634. < #include "coincontrol.h"
  1635. 14,15d12
  1636. < #include <boost/algorithm/string/replace.hpp>
  1637. <
  1638. 488,496d484
  1639. <
  1640. < // notify an external script when a wallet transaction comes in or is updated
  1641. < std::string strCmd = GetArg("-walletnotify", "");
  1642. <
  1643. < if ( !strCmd.empty())
  1644. < {
  1645. < boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex());
  1646. < boost::thread t(runCommand, strCmd); // thread runs free
  1647. < }
  1648. 1009,1011c997
  1649. < void CWallet::AvailableCoins(vector<COutput>& vCoins,
  1650. < bool fOnlyConfirmed,
  1651. < const CCoinControl *coinControl) const
  1652. ---
  1653. > void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed) const
  1654. 1034,1035c1020
  1655. < if (!(pcoin->IsSpent(i)) && IsMine(pcoin->vout[i]) && pcoin->vout[i].nValue > 0 &&
  1656. < (!coinControl || !coinControl->HasSelected() || coinControl->IsSelected((*it).first, i)))
  1657. ---
  1658. > if (!(pcoin->IsSpent(i)) && IsMine(pcoin->vout[i]) && pcoin->vout[i].nValue > 0)
  1659. 1041,1042c1026
  1660. < static void ApproximateBestSubset(vector<pair<int64, pair<const CWalletTx*,unsigned int> > >vValue,
  1661. < int64 nTotalLower, int64 nTargetValue,
  1662. ---
  1663. > static void ApproximateBestSubset(vector<pair<int64, pair<const CWalletTx*,unsigned int> > >vValue, int64 nTotalLower, int64 nTargetValue,
  1664. 1107,1108c1091
  1665. < bool CWallet::SelectCoinsMinConf(int64 nTargetValue, unsigned int nSpendTime, int nConfMine, int nConfTheirs, vector<COutput> vCoins,
  1666. < set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet) const
  1667. ---
  1668. > bool CWallet::SelectCoinsMinConf(int64 nTargetValue, unsigned int nSpendTime, int nConfMine, int nConfTheirs, vector<COutput> vCoins, set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet) const
  1669. 1213,1217c1196
  1670. < bool CWallet::SelectCoins(int64 nTargetValue,
  1671. < unsigned int nSpendTime,
  1672. < set<pair<const CWalletTx*,unsigned int> >& setCoinsRet,
  1673. < int64& nValueRet,
  1674. < const CCoinControl* coinControl) const
  1675. ---
  1676. > bool CWallet::SelectCoins(int64 nTargetValue, unsigned int nSpendTime, set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet) const
  1677. 1220,1231c1199
  1678. < AvailableCoins(vCoins, true, coinControl);
  1679. <
  1680. < // coin control -> return all selected outputs (we want all selected to go into the transaction for sure)
  1681. < if (coinControl && coinControl->HasSelected())
  1682. < {
  1683. < BOOST_FOREACH(const COutput& out, vCoins)
  1684. < {
  1685. < nValueRet += out.tx->vout[out.i].nValue;
  1686. < setCoinsRet.insert(make_pair(out.tx, out.i));
  1687. < }
  1688. < return (nValueRet >= nTargetValue);
  1689. < }
  1690. ---
  1691. > AvailableCoins(vCoins);
  1692. 1239,1243c1207,1209
  1693. < bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend,
  1694. < CWalletTx& wtxNew,
  1695. < CReserveKey& reservekey,
  1696. < int64& nFeeRet,
  1697. < const CCoinControl* coinControl)
  1698. ---
  1699. >
  1700. >
  1701. > bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet)
  1702. 1278c1244
  1703. < if (!SelectCoins(nTotalValue, wtxNew.nTime, setCoins, nValueIn, coinControl))
  1704. ---
  1705. > if (!SelectCoins(nTotalValue, wtxNew.nTime, setCoins, nValueIn))
  1706. 1305a1272,1282
  1707. > // Note: We use a new key here to keep it from being obvious which side is the change.
  1708. > // The drawback is that by not reusing a previous key, the change may be lost if a
  1709. > // backup is restored, if the backup doesn't have the new private key for the change.
  1710. > // If we reused the old key, it would be possible to add code to look for and
  1711. > // rediscover unknown transactions that were written with keys of ours to recover
  1712. > // post-backup change.
  1713. >
  1714. > // Reserve a new key pair from key pool
  1715. > CPubKey vchPubKey = reservekey.GetReservedKey();
  1716. > // assert(mapKeys.count(vchPubKey));
  1717. >
  1718. 1310,1330c1287
  1719. <
  1720. < // coin control: send change to custom address
  1721. < if (coinControl && !boost::get<CNoDestination>(&coinControl->destChange))
  1722. < scriptChange.SetDestination(coinControl->destChange);
  1723. <
  1724. < // no coin control: send change to newly generated address
  1725. < else
  1726. < {
  1727. < // Note: We use a new key here to keep it from being obvious which side is the change.
  1728. < // The drawback is that by not reusing a previous key, the change may be lost if a
  1729. < // backup is restored, if the backup doesn't have the new private key for the change.
  1730. < // If we reused the old key, it would be possible to add code to look for and
  1731. < // rediscover unknown transactions that were written with keys of ours to recover
  1732. < // post-backup change.
  1733. <
  1734. < // Reserve a new key pair from key pool
  1735. < CPubKey vchPubKey = reservekey.GetReservedKey();
  1736. <
  1737. < scriptChange.SetDestination(vchPubKey.GetID());
  1738. < }
  1739. <
  1740. ---
  1741. > scriptChange.SetDestination(vchPubKey.GetID());
  1742. 1357c1314
  1743. < int64 nMinFee = wtxNew.GetMinFee(1, false, GMF_SEND, nBytes);
  1744. ---
  1745. > int64 nMinFee = wtxNew.GetMinFee(1, false, GMF_SEND);
  1746. 1376,1381c1333
  1747. < bool CWallet::CreateTransaction(CScript scriptPubKey,
  1748. < int64 nValue,
  1749. < CWalletTx& wtxNew,
  1750. < CReserveKey& reservekey,
  1751. < int64& nFeeRet,
  1752. < const CCoinControl* coinControl)
  1753. ---
  1754. > bool CWallet::CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet)
  1755. 1385c1337
  1756. < return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet, coinControl);
  1757. ---
  1758. > return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet);
  1759. 1394,1395c1346
  1760. < unsigned int nHeight = GetLastBlockIndex(pindexBest, false)->nHeight+1;
  1761. < int64 nCombineThreshold = GetProofOfWorkReward(nHeight) / 3;
  1762. ---
  1763. > int64 nCombineThreshold = GetProofOfWorkReward(GetLastBlockIndex(pindexBest, false)->nBits) / 3;
  1764. 1637c1588
  1765. < string CWallet::SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee, std::string strTxComment)
  1766. ---
  1767. > string CWallet::SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee)
  1768. 1676c1627
  1769. < string CWallet::SendMoneyToDestination(const CTxDestination& address, int64 nValue, CWalletTx& wtxNew, bool fAskFee, std::string strTxComment)
  1770. ---
  1771. > string CWallet::SendMoneyToDestination(const CTxDestination& address, int64 nValue, CWalletTx& wtxNew, bool fAskFee)
  1772. 1688c1639
  1773. < return SendMoney(scriptPubKey, nValue, wtxNew, fAskFee, strTxComment);
  1774. ---
  1775. > return SendMoney(scriptPubKey, nValue, wtxNew, fAskFee);
  1776. diff -r Android-Token-V2/src/wallet.h ADTv2-source/src/wallet.h
  1777. 26d25
  1778. < class CCoinControl;
  1779. 73,77c72
  1780. < bool SelectCoins(int64 nTargetValue,
  1781. < unsigned int nSpendTime,
  1782. < std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet,
  1783. < int64& nValueRet,
  1784. < const CCoinControl *coinControl=NULL) const;
  1785. ---
  1786. > bool SelectCoins(int64 nTargetValue, unsigned int nSpendTime, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet) const;
  1787. 131,133c126
  1788. < void AvailableCoins(std::vector<COutput>& vCoins,
  1789. < bool fOnlyConfirmed=true,
  1790. < const CCoinControl *coinControl=NULL) const;
  1791. ---
  1792. > void AvailableCoins(std::vector<COutput>& vCoins, bool fOnlyConfirmed=true) const;
  1793. 184,194c177,178
  1794. < bool CreateTransaction(const std::vector<std::pair<CScript, int64> >& vecSend,
  1795. < CWalletTx& wtxNew,
  1796. < CReserveKey& reservekey,
  1797. < int64& nFeeRet,
  1798. < const CCoinControl *coinControl=NULL);
  1799. < bool CreateTransaction(CScript scriptPubKey,
  1800. < int64 nValue,
  1801. < CWalletTx& wtxNew,
  1802. < CReserveKey& reservekey,
  1803. < int64& nFeeRet,
  1804. < const CCoinControl *coinControl=NULL);
  1805. ---
  1806. > bool CreateTransaction(const std::vector<std::pair<CScript, int64> >& vecSend, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet);
  1807. > bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, CReserveKey& reservekey, int64& nFeeRet);
  1808. 197,198c181,182
  1809. < std::string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false, std::string strTxComment = "");
  1810. < std::string SendMoneyToDestination(const CTxDestination &address, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false, std::string strTxComment = "");
  1811. ---
  1812. > std::string SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false);
  1813. > std::string SendMoneyToDestination(const CTxDestination &address, int64 nValue, CWalletTx& wtxNew, bool fAskFee=false);
Advertisement
Add Comment
Please, Sign In to add comment