Guest User

AndoridToken v2 diff

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