Bladeren bron

transaction working with database

Vincent Sima 6 jaren geleden
bovenliggende
commit
83b86f0a92

+ 132
- 293
.idea/workspace.xml Bestand weergeven

@@ -2,9 +2,22 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="86492085-3833-4394-8353-122bd8bc6cb0" name="Default" comment="">
5
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java" afterDir="false" />
5 10
       <change beforePath="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java" afterDir="false" />
6 11
       <change beforePath="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java" afterDir="false" />
7 12
       <change beforePath="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java" afterDir="false" />
13
+      <change beforePath="$PROJECT_DIR$/src/main/resources/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.properties" afterDir="false" />
14
+      <change beforePath="$PROJECT_DIR$/target/classes/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/application.properties" afterDir="false" />
15
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/ProcessLoader.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/buecoin01/ProcessLoader.class" afterDir="false" />
16
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/controller/TransactionController$UserController.class" beforeDir="false" />
17
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/controller/TransactionController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/buecoin01/controller/TransactionController.class" afterDir="false" />
18
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/model/Block.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/buecoin01/model/Block.class" afterDir="false" />
19
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/model/Transactions.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/buecoin01/model/Transactions.class" afterDir="false" />
20
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/model/Wallet.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/buecoin01/model/Wallet.class" afterDir="false" />
8 21
     </list>
9 22
     <ignored path="$PROJECT_DIR$/target/" />
10 23
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -16,107 +29,41 @@
16 29
   </component>
17 30
   <component name="FileEditorManager">
18 31
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
19
-      <file leaf-file-name="application.properties" pinned="false" current-in-tab="false">
20
-        <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
21
-          <provider selected="true" editor-type-id="text-editor">
22
-            <state relative-caret-position="45">
23
-              <caret line="3" column="36" selection-start-line="3" selection-start-column="36" selection-end-line="3" selection-end-column="36" />
24
-            </state>
25
-          </provider>
26
-        </entry>
27
-      </file>
28
-      <file leaf-file-name="ProcessLoader.java" pinned="false" current-in-tab="false">
29
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java">
30
-          <provider selected="true" editor-type-id="text-editor">
31
-            <state relative-caret-position="390">
32
-              <caret line="26" selection-start-line="26" selection-end-line="26" />
33
-              <folding>
34
-                <element signature="imports" expanded="true" />
35
-              </folding>
36
-            </state>
37
-          </provider>
38
-        </entry>
39
-      </file>
40
-      <file leaf-file-name="Block.java" pinned="false" current-in-tab="true">
41
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java">
32
+      <file leaf-file-name="Application.java" pinned="false" current-in-tab="false">
33
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Application.java">
42 34
           <provider selected="true" editor-type-id="text-editor">
43
-            <state relative-caret-position="334">
44
-              <caret line="82" lean-forward="true" selection-start-line="82" selection-end-line="82" />
35
+            <state relative-caret-position="60">
36
+              <caret line="6" column="22" selection-start-line="6" selection-start-column="22" selection-end-line="6" selection-end-column="22" />
45 37
             </state>
46 38
           </provider>
47 39
         </entry>
48 40
       </file>
49
-      <file leaf-file-name="Transactions.java" pinned="false" current-in-tab="false">
50
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java">
41
+      <file leaf-file-name="application.properties" pinned="false" current-in-tab="false">
42
+        <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
51 43
           <provider selected="true" editor-type-id="text-editor">
52
-            <state relative-caret-position="202">
53
-              <caret line="31" column="114" selection-start-line="31" selection-start-column="114" selection-end-line="31" selection-end-column="114" />
54
-              <folding>
55
-                <element signature="imports" expanded="true" />
56
-                <element signature="e#854#855#0" expanded="true" />
57
-                <element signature="e#879#880#0" expanded="true" />
58
-                <element signature="e#913#914#0" expanded="true" />
59
-                <element signature="e#941#942#0" expanded="true" />
60
-                <element signature="e#981#982#0" expanded="true" />
61
-                <element signature="e#1017#1018#0" expanded="true" />
62
-                <element signature="e#1075#1076#0" expanded="true" />
63
-                <element signature="e#1125#1126#0" expanded="true" />
64
-                <element signature="e#1158#1159#0" expanded="true" />
65
-                <element signature="e#1187#1188#0" expanded="true" />
66
-                <element signature="e#1231#1232#0" expanded="true" />
67
-                <element signature="e#1267#1268#0" expanded="true" />
68
-                <element signature="e#1298#1299#0" expanded="true" />
69
-                <element signature="e#1325#1326#0" expanded="true" />
70
-                <element signature="e#1365#1366#0" expanded="true" />
71
-                <element signature="e#1397#1398#0" expanded="true" />
72
-                <element signature="e#1429#1430#0" expanded="true" />
73
-                <element signature="e#1458#1459#0" expanded="true" />
74
-                <element signature="e#1501#1502#0" expanded="true" />
75
-                <element signature="e#1537#1538#0" expanded="true" />
76
-                <element signature="e#1580#1581#0" expanded="true" />
77
-                <element signature="e#1612#1613#0" expanded="true" />
78
-                <element signature="e#1669#1670#0" expanded="true" />
79
-                <element signature="e#1711#1712#0" expanded="true" />
80
-              </folding>
44
+            <state relative-caret-position="15">
45
+              <caret line="1" selection-start-line="1" selection-end-line="1" />
81 46
             </state>
82 47
           </provider>
83 48
         </entry>
84 49
       </file>
85
-      <file leaf-file-name="Wallet.java" pinned="false" current-in-tab="false">
86
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java">
50
+      <file leaf-file-name="WalletController.java" pinned="false" current-in-tab="false">
51
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java">
87 52
           <provider selected="true" editor-type-id="text-editor">
88
-            <state relative-caret-position="139">
89
-              <caret line="44" selection-start-line="44" selection-end-line="44" />
53
+            <state relative-caret-position="648">
54
+              <caret line="52" selection-start-line="52" selection-end-line="52" />
90 55
               <folding>
91 56
                 <element signature="imports" expanded="true" />
92
-                <element signature="e#925#926#0" expanded="true" />
93
-                <element signature="e#952#953#0" expanded="true" />
94
-                <element signature="e#992#993#0" expanded="true" />
95
-                <element signature="e#1024#1025#0" expanded="true" />
96
-                <element signature="e#1123#1124#0" expanded="true" />
97
-                <element signature="e#1156#1157#0" expanded="true" />
98
-                <element signature="e#1195#1196#0" expanded="true" />
99
-                <element signature="e#1227#1228#0" expanded="true" />
100
-                <element signature="e#1258#1259#0" expanded="true" />
101
-                <element signature="e#1287#1288#0" expanded="true" />
102
-                <element signature="e#1329#1330#0" expanded="true" />
103
-                <element signature="e#1365#1366#0" expanded="true" />
104
-                <element signature="e#1481#1482#0" expanded="true" />
105
-                <element signature="e#1521#1522#0" expanded="true" />
106
-                <element signature="e#1548#1549#0" expanded="true" />
107
-                <element signature="e#1573#1574#0" expanded="true" />
108
-                <element signature="e#1607#1608#0" expanded="true" />
109
-                <element signature="e#1635#1636#0" expanded="true" />
110 57
               </folding>
111 58
             </state>
112 59
           </provider>
113 60
         </entry>
114 61
       </file>
115
-      <file leaf-file-name="WalletController.java" pinned="false" current-in-tab="false">
116
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java">
62
+      <file leaf-file-name="ProcessLoader.java" pinned="false" current-in-tab="false">
63
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java">
117 64
           <provider selected="true" editor-type-id="text-editor">
118
-            <state relative-caret-position="210">
119
-              <caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
65
+            <state relative-caret-position="510">
66
+              <caret line="34" selection-start-line="34" selection-end-line="34" />
120 67
               <folding>
121 68
                 <element signature="imports" expanded="true" />
122 69
               </folding>
@@ -124,11 +71,11 @@
124 71
           </provider>
125 72
         </entry>
126 73
       </file>
127
-      <file leaf-file-name="TransactionController.java" pinned="false" current-in-tab="false">
128
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java">
74
+      <file leaf-file-name="ConductTransactions.java" pinned="false" current-in-tab="true">
75
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java">
129 76
           <provider selected="true" editor-type-id="text-editor">
130
-            <state relative-caret-position="210">
131
-              <caret line="14" column="42" lean-forward="true" selection-start-line="14" selection-start-column="42" selection-end-line="14" selection-end-column="42" />
77
+            <state relative-caret-position="394">
78
+              <caret line="31" column="38" selection-start-line="31" selection-start-column="38" selection-end-line="31" selection-end-column="38" />
132 79
               <folding>
133 80
                 <element signature="imports" expanded="true" />
134 81
               </folding>
@@ -136,11 +83,11 @@
136 83
           </provider>
137 84
         </entry>
138 85
       </file>
139
-      <file leaf-file-name="BlockController.java" pinned="false" current-in-tab="false">
140
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/BlockController.java">
86
+      <file leaf-file-name="Transactions.java" pinned="false" current-in-tab="false">
87
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java">
141 88
           <provider selected="true" editor-type-id="text-editor">
142
-            <state relative-caret-position="639">
143
-              <caret line="47" column="40" selection-start-line="47" selection-start-column="40" selection-end-line="47" selection-end-column="40" />
89
+            <state relative-caret-position="825">
90
+              <caret line="71" column="17" selection-start-line="71" selection-start-column="17" selection-end-line="71" selection-end-column="17" />
144 91
               <folding>
145 92
                 <element signature="imports" expanded="true" />
146 93
               </folding>
@@ -148,11 +95,11 @@
148 95
           </provider>
149 96
         </entry>
150 97
       </file>
151
-      <file leaf-file-name="TransactionRepository.java" pinned="false" current-in-tab="false">
152
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/TransactionRepository.java">
98
+      <file leaf-file-name="Wallet.java" pinned="false" current-in-tab="false">
99
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java">
153 100
           <provider selected="true" editor-type-id="text-editor">
154
-            <state relative-caret-position="180">
155
-              <caret line="12" column="17" selection-start-line="12" selection-start-column="17" selection-end-line="12" selection-end-column="17" />
101
+            <state relative-caret-position="139">
102
+              <caret line="16" lean-forward="true" selection-start-line="16" selection-end-line="16" />
156 103
               <folding>
157 104
                 <element signature="imports" expanded="true" />
158 105
               </folding>
@@ -160,23 +107,14 @@
160 107
           </provider>
161 108
         </entry>
162 109
       </file>
163
-      <file leaf-file-name="BlockRepository.java" pinned="false" current-in-tab="false">
164
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/BlockRepository.java">
165
-          <provider selected="true" editor-type-id="text-editor">
166
-            <state relative-caret-position="75">
167
-              <caret line="8" column="1" selection-start-line="8" selection-end-line="9" />
168
-            </state>
169
-          </provider>
170
-        </entry>
171
-      </file>
172 110
     </leaf>
173 111
   </component>
174 112
   <component name="FileTemplateManagerImpl">
175 113
     <option name="RECENT_TEMPLATES">
176 114
       <list>
177 115
         <option value="Interface" />
178
-        <option value="Class" />
179 116
         <option value="AnnotationType" />
117
+        <option value="Class" />
180 118
       </list>
181 119
     </option>
182 120
   </component>
@@ -197,18 +135,19 @@
197 135
       <list>
198 136
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/WalletRepository.java" />
199 137
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/BlockController.java" />
200
-        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java" />
201 138
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/BlockchainVerification.java" />
202 139
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transaction.java" />
203
-        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java" />
204 140
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/TransactionRepository.java" />
205 141
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/EnableMongoRepositories.java" />
206 142
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/Application.java" />
143
+        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java" />
207 144
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java" />
208
-        <option value="$PROJECT_DIR$/src/main/resources/application.properties" />
145
+        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java" />
209 146
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java" />
147
+        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java" />
148
+        <option value="$PROJECT_DIR$/src/main/resources/application.properties" />
210 149
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java" />
211
-        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java" />
150
+        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java" />
212 151
       </list>
213 152
     </option>
214 153
   </component>
@@ -238,6 +177,7 @@
238 177
       <foldersAlwaysOnTop value="true" />
239 178
     </navigator>
240 179
     <panes>
180
+      <pane id="AndroidView" />
241 181
       <pane id="ProjectPane">
242 182
         <subPane>
243 183
           <expand>
@@ -319,13 +259,18 @@
319 259
               <item name="main" type="462c0819:PsiDirectoryNode" />
320 260
               <item name="resources" type="462c0819:PsiDirectoryNode" />
321 261
             </path>
262
+            <path>
263
+              <item name="0.1" type="b2602c69:ProjectViewProjectNode" />
264
+              <item name="CryptoCoin" type="462c0819:PsiDirectoryNode" />
265
+              <item name="src" type="462c0819:PsiDirectoryNode" />
266
+              <item name="test" type="462c0819:PsiDirectoryNode" />
267
+            </path>
322 268
           </expand>
323 269
           <select />
324 270
         </subPane>
325 271
       </pane>
326
-      <pane id="PackagesPane" />
327
-      <pane id="AndroidView" />
328 272
       <pane id="Scope" />
273
+      <pane id="PackagesPane" />
329 274
     </panes>
330 275
   </component>
331 276
   <component name="PropertiesComponent">
@@ -335,6 +280,7 @@
335 280
     <property name="RequestMappingsPanelWidth1" value="75" />
336 281
     <property name="WebServerToolWindowFactoryState" value="false" />
337 282
     <property name="aspect.path.notification.shown" value="true" />
283
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
338 284
   </component>
339 285
   <component name="RecentsManager">
340 286
     <key name="CreateClassDialog.RecentsKey">
@@ -431,72 +377,49 @@
431 377
       <option name="presentableId" value="Default" />
432 378
       <updated>1532357794192</updated>
433 379
       <workItem from="1532357795573" duration="4040000" />
380
+      <workItem from="1532473422589" duration="716000" />
434 381
     </task>
435 382
     <servers />
436 383
   </component>
437 384
   <component name="TimeTrackingManager">
438
-    <option name="totallyTimeSpent" value="9883000" />
385
+    <option name="totallyTimeSpent" value="12326000" />
439 386
   </component>
440 387
   <component name="ToolWindowManager">
441
-    <frame x="0" y="0" width="1280" height="800" extended-state="6" />
388
+    <frame x="0" y="0" width="1920" height="1080" extended-state="6" />
389
+    <editor active="true" />
442 390
     <layout>
443
-      <window_info anchor="right" id="Palette" order="3" />
444
-      <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
445
-      <window_info anchor="right" id="Maven Projects" order="3" />
446
-      <window_info anchor="bottom" id="Database Changes" order="7" show_stripe_button="false" />
447
-      <window_info id="Capture Tool" order="2" />
448
-      <window_info id="Designer" order="2" />
449
-      <window_info anchor="right" id="Database" order="3" />
391
+      <window_info anchor="right" id="Palette" order="6" />
392
+      <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
393
+      <window_info anchor="right" id="Maven Projects" order="6" />
394
+      <window_info anchor="bottom" id="Database Changes" order="10" show_stripe_button="false" />
395
+      <window_info id="Capture Tool" order="5" />
396
+      <window_info id="Designer" order="5" />
397
+      <window_info anchor="right" id="Database" order="6" />
450 398
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
451 399
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
452
-      <window_info id="UI Designer" order="2" />
400
+      <window_info id="UI Designer" order="5" />
453 401
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
454 402
       <window_info anchor="bottom" id="TODO" order="6" />
455 403
       <window_info anchor="bottom" id="Messages" order="9" weight="0.27492878" />
456
-      <window_info anchor="right" id="Palette&#9;" order="3" />
457
-      <window_info id="Image Layers" order="2" />
458
-      <window_info anchor="bottom" id="Java Enterprise" order="7" />
459
-      <window_info anchor="right" id="Capture Analysis" order="3" />
460
-      <window_info anchor="bottom" id="Version Control" order="7" />
461
-      <window_info anchor="bottom" id="Run" order="2" weight="0.32763532" />
462
-      <window_info anchor="bottom" id="Spring" order="7" weight="0.3299389" />
463
-      <window_info active="true" anchor="bottom" id="Terminal" order="7" visible="true" weight="0.32905984" />
464
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2536349" />
465
-      <window_info anchor="right" id="Bean Validation" order="3" />
466
-      <window_info id="Web" order="2" side_tool="true" />
467
-      <window_info anchor="right" id="Theme Preview" order="3" />
468
-      <window_info id="Favorites" order="2" side_tool="true" />
469
-      <window_info anchor="bottom" id="Message" order="0" />
470
-      <window_info anchor="bottom" id="Run" order="2" />
471
-      <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
472
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.30329043" />
473
-      <window_info id="Favorites" order="5" side_tool="true" />
474
-      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
404
+      <window_info anchor="right" id="Palette&#9;" order="6" />
405
+      <window_info id="Image Layers" order="5" />
475 406
       <window_info anchor="bottom" id="Java Enterprise" order="10" />
476
-      <window_info anchor="right" id="Bean Validation" order="6" />
407
+      <window_info anchor="right" id="Capture Analysis" order="6" />
408
+      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.3299389" />
409
+      <window_info anchor="bottom" id="Version Control" order="10" />
410
+      <window_info anchor="bottom" id="Spring" order="10" />
477 411
       <window_info anchor="bottom" id="Terminal" order="10" />
478
-      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
479
-      <window_info anchor="right" id="Palette" order="6" />
480
-      <window_info anchor="right" id="Palette&#9;" order="6" />
481
-      <window_info anchor="right" id="Maven Projects" order="6" />
412
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.30298188" />
413
+      <window_info anchor="right" id="Bean Validation" order="6" />
482 414
       <window_info id="Web" order="5" side_tool="true" />
483
-      <window_info anchor="bottom" id="Database Changes" order="10" show_stripe_button="false" />
484
-      <window_info anchor="bottom" id="Spring" order="10" />
485
-      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
486
-      <window_info id="Image Layers" order="5" />
487 415
       <window_info anchor="right" id="Theme Preview" order="6" />
488
-      <window_info anchor="right" id="Database" order="6" />
489
-      <window_info id="Capture Tool" order="5" />
490
-      <window_info anchor="bottom" id="Version Control" order="10" />
491
-      <window_info anchor="right" id="Capture Analysis" order="6" />
492
-      <window_info anchor="bottom" id="TODO" order="6" />
416
+      <window_info id="Favorites" order="5" side_tool="true" />
493 417
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
418
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
494 419
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
495
-      <window_info id="UI Designer" order="5" />
420
+      <window_info anchor="bottom" id="Message" order="0" />
421
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
496 422
       <window_info anchor="bottom" id="Find" order="1" />
497
-      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
498
-      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
499
-      <window_info id="Designer" order="5" />
500 423
     </layout>
501 424
     <layout-to-restore>
502 425
       <window_info id="Designer" order="0" />
@@ -539,18 +462,6 @@
539 462
     <option name="myLimit" value="2678400000" />
540 463
   </component>
541 464
   <component name="editorHistoryManager">
542
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java">
543
-      <provider selected="true" editor-type-id="text-editor">
544
-        <state relative-caret-position="360">
545
-          <caret line="24" column="29" selection-start-line="24" selection-start-column="29" selection-end-line="24" selection-end-column="29" />
546
-          <folding>
547
-            <element signature="e#581#582#0" expanded="true" />
548
-            <element signature="e#621#622#0" expanded="true" />
549
-            <element signature="e#653#654#0" expanded="true" />
550
-          </folding>
551
-        </state>
552
-      </provider>
553
-    </entry>
554 465
     <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/CoinRepository.java" />
555 466
     <entry file="file://$PROJECT_DIR$/src/test/java/com/buecoin01/ApplicationTests.java">
556 467
       <provider selected="true" editor-type-id="text-editor">
@@ -563,6 +474,10 @@
563 474
       <provider selected="true" editor-type-id="text-editor">
564 475
         <state relative-caret-position="945">
565 476
           <caret line="78" selection-start-line="78" selection-end-line="78" />
477
+          <folding>
478
+            <element signature="e#969#970#0" expanded="true" />
479
+            <element signature="e#996#997#0" expanded="true" />
480
+          </folding>
566 481
         </state>
567 482
       </provider>
568 483
     </entry>
@@ -599,9 +514,7 @@
599 514
         <state relative-caret-position="360">
600 515
           <caret line="24" column="29" selection-start-line="24" selection-start-column="29" selection-end-line="24" selection-end-column="29" />
601 516
           <folding>
602
-            <element signature="e#581#582#0" expanded="true" />
603
-            <element signature="e#621#622#0" expanded="true" />
604
-            <element signature="e#653#654#0" expanded="true" />
517
+            <element signature="imports" expanded="true" />
605 518
           </folding>
606 519
         </state>
607 520
       </provider>
@@ -678,30 +591,6 @@
678 591
           <caret line="117" column="26" selection-start-line="117" selection-start-column="26" selection-end-line="117" selection-end-column="26" />
679 592
           <folding>
680 593
             <element signature="imports" expanded="true" />
681
-            <element signature="e#854#855#0" expanded="true" />
682
-            <element signature="e#879#880#0" expanded="true" />
683
-            <element signature="e#913#914#0" expanded="true" />
684
-            <element signature="e#941#942#0" expanded="true" />
685
-            <element signature="e#981#982#0" expanded="true" />
686
-            <element signature="e#1017#1018#0" expanded="true" />
687
-            <element signature="e#1075#1076#0" expanded="true" />
688
-            <element signature="e#1125#1126#0" expanded="true" />
689
-            <element signature="e#1158#1159#0" expanded="true" />
690
-            <element signature="e#1187#1188#0" expanded="true" />
691
-            <element signature="e#1231#1232#0" expanded="true" />
692
-            <element signature="e#1267#1268#0" expanded="true" />
693
-            <element signature="e#1298#1299#0" expanded="true" />
694
-            <element signature="e#1325#1326#0" expanded="true" />
695
-            <element signature="e#1365#1366#0" expanded="true" />
696
-            <element signature="e#1397#1398#0" expanded="true" />
697
-            <element signature="e#1429#1430#0" expanded="true" />
698
-            <element signature="e#1458#1459#0" expanded="true" />
699
-            <element signature="e#1501#1502#0" expanded="true" />
700
-            <element signature="e#1537#1538#0" expanded="true" />
701
-            <element signature="e#1580#1581#0" expanded="true" />
702
-            <element signature="e#1612#1613#0" expanded="true" />
703
-            <element signature="e#1669#1670#0" expanded="true" />
704
-            <element signature="e#1711#1712#0" expanded="true" />
705 594
           </folding>
706 595
         </state>
707 596
       </provider>
@@ -762,17 +651,7 @@
762 651
         </state>
763 652
       </provider>
764 653
     </entry>
765
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Blockchain.java">
766
-      <provider selected="true" editor-type-id="text-editor">
767
-        <state relative-caret-position="347">
768
-          <caret line="34" selection-start-line="34" selection-end-line="34" />
769
-          <folding>
770
-            <element signature="imports" expanded="true" />
771
-            <element signature="e#1854#1855#0" expanded="true" />
772
-          </folding>
773
-        </state>
774
-      </provider>
775
-    </entry>
654
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Blockchain.java" />
776 655
     <entry file="file://$PROJECT_DIR$/pom.xml">
777 656
       <provider selected="true" editor-type-id="text-editor">
778 657
         <state relative-caret-position="990">
@@ -836,78 +715,87 @@
836 715
         </state>
837 716
       </provider>
838 717
     </entry>
839
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/EnableMongoRepositories.java">
718
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/EnableMongoRepositories.java" />
719
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/BlockRepository.java">
840 720
       <provider selected="true" editor-type-id="text-editor">
841
-        <state relative-caret-position="30">
842
-          <caret line="2" column="18" selection-start-line="2" selection-start-column="18" selection-end-line="2" selection-end-column="18" />
721
+        <state relative-caret-position="75">
722
+          <caret line="8" column="1" selection-start-line="8" selection-end-line="9" />
843 723
         </state>
844 724
       </provider>
845 725
     </entry>
846
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Application.java">
726
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/BlockController.java">
847 727
       <provider selected="true" editor-type-id="text-editor">
848
-        <state relative-caret-position="60">
849
-          <caret line="6" column="22" selection-start-line="6" selection-start-column="22" selection-end-line="6" selection-end-column="22" />
728
+        <state relative-caret-position="639">
729
+          <caret line="47" column="40" selection-start-line="47" selection-start-column="40" selection-end-line="47" selection-end-column="40" />
850 730
         </state>
851 731
       </provider>
852 732
     </entry>
853
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/WalletRepository.java">
733
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java">
854 734
       <provider selected="true" editor-type-id="text-editor">
855
-        <state relative-caret-position="75">
856
-          <caret line="8" lean-forward="true" selection-start-line="8" selection-end-line="8" />
735
+        <state relative-caret-position="148">
736
+          <caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
737
+          <folding>
738
+            <element signature="e#969#970#0" expanded="true" />
739
+            <element signature="e#996#997#0" expanded="true" />
740
+          </folding>
857 741
         </state>
858 742
       </provider>
859 743
     </entry>
860
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/TransactionRepository.java">
744
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/WalletRepository.java">
861 745
       <provider selected="true" editor-type-id="text-editor">
862
-        <state relative-caret-position="180">
863
-          <caret line="12" column="17" selection-start-line="12" selection-start-column="17" selection-end-line="12" selection-end-column="17" />
864
-          <folding>
865
-            <element signature="imports" expanded="true" />
866
-          </folding>
746
+        <state>
747
+          <caret column="35" lean-forward="true" selection-start-column="35" selection-end-column="35" />
867 748
         </state>
868 749
       </provider>
869 750
     </entry>
870
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/BlockRepository.java">
751
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/TransactionRepository.java">
871 752
       <provider selected="true" editor-type-id="text-editor">
872
-        <state relative-caret-position="75">
873
-          <caret line="8" column="1" selection-start-line="8" selection-end-line="9" />
753
+        <state relative-caret-position="90">
754
+          <caret line="6" column="59" lean-forward="true" selection-start-line="6" selection-start-column="59" selection-end-line="6" selection-end-column="59" />
874 755
         </state>
875 756
       </provider>
876 757
     </entry>
877 758
     <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java">
878 759
       <provider selected="true" editor-type-id="text-editor">
879
-        <state relative-caret-position="210">
880
-          <caret line="14" column="42" lean-forward="true" selection-start-line="14" selection-start-column="42" selection-end-line="14" selection-end-column="42" />
760
+        <state relative-caret-position="599">
761
+          <caret line="56" lean-forward="true" selection-start-line="56" selection-end-line="56" />
881 762
           <folding>
882 763
             <element signature="imports" expanded="true" />
883 764
           </folding>
884 765
         </state>
885 766
       </provider>
886 767
     </entry>
887
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/BlockController.java">
768
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java">
888 769
       <provider selected="true" editor-type-id="text-editor">
889
-        <state relative-caret-position="639">
890
-          <caret line="47" column="40" selection-start-line="47" selection-start-column="40" selection-end-line="47" selection-end-column="40" />
770
+        <state relative-caret-position="825">
771
+          <caret line="71" column="17" selection-start-line="71" selection-start-column="17" selection-end-line="71" selection-end-column="17" />
891 772
           <folding>
892 773
             <element signature="imports" expanded="true" />
893 774
           </folding>
894 775
         </state>
895 776
       </provider>
896 777
     </entry>
897
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java">
778
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java">
898 779
       <provider selected="true" editor-type-id="text-editor">
899
-        <state relative-caret-position="210">
900
-          <caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
780
+        <state relative-caret-position="510">
781
+          <caret line="34" selection-start-line="34" selection-end-line="34" />
901 782
           <folding>
902 783
             <element signature="imports" expanded="true" />
903 784
           </folding>
904 785
         </state>
905 786
       </provider>
906 787
     </entry>
907
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java">
788
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Application.java">
789
+      <provider selected="true" editor-type-id="text-editor">
790
+        <state relative-caret-position="60">
791
+          <caret line="6" column="22" selection-start-line="6" selection-start-column="22" selection-end-line="6" selection-end-column="22" />
792
+        </state>
793
+      </provider>
794
+    </entry>
795
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java">
908 796
       <provider selected="true" editor-type-id="text-editor">
909
-        <state relative-caret-position="390">
910
-          <caret line="26" selection-start-line="26" selection-end-line="26" />
797
+        <state relative-caret-position="139">
798
+          <caret line="16" lean-forward="true" selection-start-line="16" selection-end-line="16" />
911 799
           <folding>
912 800
             <element signature="imports" expanded="true" />
913 801
           </folding>
@@ -916,79 +804,30 @@
916 804
     </entry>
917 805
     <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
918 806
       <provider selected="true" editor-type-id="text-editor">
919
-        <state relative-caret-position="45">
920
-          <caret line="3" column="36" selection-start-line="3" selection-start-column="36" selection-end-line="3" selection-end-column="36" />
807
+        <state relative-caret-position="15">
808
+          <caret line="1" selection-start-line="1" selection-end-line="1" />
921 809
         </state>
922 810
       </provider>
923 811
     </entry>
924
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java">
812
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java">
925 813
       <provider selected="true" editor-type-id="text-editor">
926
-        <state relative-caret-position="202">
927
-          <caret line="31" column="114" selection-start-line="31" selection-start-column="114" selection-end-line="31" selection-end-column="114" />
814
+        <state relative-caret-position="648">
815
+          <caret line="52" selection-start-line="52" selection-end-line="52" />
928 816
           <folding>
929 817
             <element signature="imports" expanded="true" />
930
-            <element signature="e#854#855#0" expanded="true" />
931
-            <element signature="e#879#880#0" expanded="true" />
932
-            <element signature="e#913#914#0" expanded="true" />
933
-            <element signature="e#941#942#0" expanded="true" />
934
-            <element signature="e#981#982#0" expanded="true" />
935
-            <element signature="e#1017#1018#0" expanded="true" />
936
-            <element signature="e#1075#1076#0" expanded="true" />
937
-            <element signature="e#1125#1126#0" expanded="true" />
938
-            <element signature="e#1158#1159#0" expanded="true" />
939
-            <element signature="e#1187#1188#0" expanded="true" />
940
-            <element signature="e#1231#1232#0" expanded="true" />
941
-            <element signature="e#1267#1268#0" expanded="true" />
942
-            <element signature="e#1298#1299#0" expanded="true" />
943
-            <element signature="e#1325#1326#0" expanded="true" />
944
-            <element signature="e#1365#1366#0" expanded="true" />
945
-            <element signature="e#1397#1398#0" expanded="true" />
946
-            <element signature="e#1429#1430#0" expanded="true" />
947
-            <element signature="e#1458#1459#0" expanded="true" />
948
-            <element signature="e#1501#1502#0" expanded="true" />
949
-            <element signature="e#1537#1538#0" expanded="true" />
950
-            <element signature="e#1580#1581#0" expanded="true" />
951
-            <element signature="e#1612#1613#0" expanded="true" />
952
-            <element signature="e#1669#1670#0" expanded="true" />
953
-            <element signature="e#1711#1712#0" expanded="true" />
954 818
           </folding>
955 819
         </state>
956 820
       </provider>
957 821
     </entry>
958
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java">
822
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java">
959 823
       <provider selected="true" editor-type-id="text-editor">
960
-        <state relative-caret-position="139">
961
-          <caret line="44" selection-start-line="44" selection-end-line="44" />
824
+        <state relative-caret-position="394">
825
+          <caret line="31" column="38" selection-start-line="31" selection-start-column="38" selection-end-line="31" selection-end-column="38" />
962 826
           <folding>
963 827
             <element signature="imports" expanded="true" />
964
-            <element signature="e#925#926#0" expanded="true" />
965
-            <element signature="e#952#953#0" expanded="true" />
966
-            <element signature="e#992#993#0" expanded="true" />
967
-            <element signature="e#1024#1025#0" expanded="true" />
968
-            <element signature="e#1123#1124#0" expanded="true" />
969
-            <element signature="e#1156#1157#0" expanded="true" />
970
-            <element signature="e#1195#1196#0" expanded="true" />
971
-            <element signature="e#1227#1228#0" expanded="true" />
972
-            <element signature="e#1258#1259#0" expanded="true" />
973
-            <element signature="e#1287#1288#0" expanded="true" />
974
-            <element signature="e#1329#1330#0" expanded="true" />
975
-            <element signature="e#1365#1366#0" expanded="true" />
976
-            <element signature="e#1481#1482#0" expanded="true" />
977
-            <element signature="e#1521#1522#0" expanded="true" />
978
-            <element signature="e#1548#1549#0" expanded="true" />
979
-            <element signature="e#1573#1574#0" expanded="true" />
980
-            <element signature="e#1607#1608#0" expanded="true" />
981
-            <element signature="e#1635#1636#0" expanded="true" />
982 828
           </folding>
983 829
         </state>
984 830
       </provider>
985 831
     </entry>
986
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java">
987
-      <provider selected="true" editor-type-id="text-editor">
988
-        <state relative-caret-position="334">
989
-          <caret line="82" lean-forward="true" selection-start-line="82" selection-end-line="82" />
990
-        </state>
991
-      </provider>
992
-    </entry>
993 832
   </component>
994 833
 </project>

+ 5
- 0
src/main/java/com/buecoin01/ProcessLoader.java Bestand weergeven

@@ -3,6 +3,7 @@ package com.buecoin01;
3 3
 import com.buecoin01.Repositories.BlockRepository;
4 4
 import com.buecoin01.Repositories.WalletRepository;
5 5
 
6
+import com.buecoin01.controller.ConductTransactions;
6 7
 import org.springframework.beans.factory.annotation.Autowired;
7 8
 import org.springframework.boot.ApplicationArguments;
8 9
 import org.springframework.boot.ApplicationRunner;
@@ -21,9 +22,13 @@ public class ProcessLoader implements ApplicationRunner {
21 22
     @Autowired
22 23
     BlockRepository repo3;
23 24
 
25
+    @Autowired
26
+    ConductTransactions transaction;
27
+
24 28
 
25 29
     @Override
26 30
     public void run(ApplicationArguments args) {
31
+        transaction.transferMoney(2L,1L,500);
27 32
 
28 33
     }
29 34
 }

+ 46
- 0
src/main/java/com/buecoin01/controller/ConductTransactions.java Bestand weergeven

@@ -0,0 +1,46 @@
1
+package com.buecoin01.controller;
2
+
3
+import com.buecoin01.Repositories.TransactionRepository;
4
+import com.buecoin01.Repositories.WalletRepository;
5
+import com.buecoin01.model.Transactions;
6
+import com.buecoin01.model.Wallet;
7
+import com.buecoin01.utility.Encryption;
8
+import org.springframework.beans.factory.annotation.Autowired;
9
+import org.springframework.web.bind.annotation.RestController;
10
+
11
+import java.time.LocalDateTime;
12
+
13
+@RestController
14
+public class ConductTransactions {
15
+    @Autowired
16
+    private TransactionRepository transactionRepository;
17
+
18
+    @Autowired
19
+    private WalletRepository walletRepository;
20
+
21
+
22
+    public double getBalance(Long id){
23
+        return walletRepository.getOne(id).getAmount();
24
+    }
25
+
26
+    public String transferMoney(Long toId, Long fromId, double amount){
27
+        String response;
28
+        if(amount <= getBalance(fromId)){
29
+            Wallet from = walletRepository.getOne(toId);
30
+            from.setAmount(getBalance(fromId) - amount);
31
+            walletRepository.save(from);
32
+            Wallet to = walletRepository.getOne(fromId);
33
+            to.setAmount(getBalance(fromId) + amount);
34
+            walletRepository.save(to);
35
+            Transactions n = new Transactions(Encryption.applySha256(toId.toString() + fromId.toString() + Double.toString(amount)), Encryption.applySha256(fromId.toString()), Encryption.applySha256(toId.toString()), amount, LocalDateTime.now());
36
+            transactionRepository.save(n);
37
+            response = "Success";
38
+        } else response = "Insufficient funds";
39
+
40
+        return response;
41
+    }
42
+
43
+
44
+
45
+
46
+}

+ 5
- 5
src/main/java/com/buecoin01/controller/TransactionController.java Bestand weergeven

@@ -8,13 +8,13 @@ import org.springframework.http.ResponseEntity;
8 8
 import org.springframework.web.bind.annotation.*;
9 9
 import java.util.Optional;
10 10
 
11
+
12
+@CrossOrigin(origins = {"http://localhost:8100", "http://localhost:8080"})
13
+@RestController
14
+@RequestMapping(path = "/transaction")
11 15
 public class TransactionController {
12 16
 
13
-    @CrossOrigin(origins = {"http://localhost:8100", "http://localhost:8080"})
14
-    @RestController
15
-    @RequestMapping(path = "/transaction")
16 17
 
17
-    public class UserController {
18 18
 
19 19
 
20 20
         @Autowired
@@ -54,4 +54,4 @@ public class TransactionController {
54 54
 
55 55
 
56 56
     }
57
-}
57
+

+ 2
- 0
src/main/java/com/buecoin01/controller/WalletController.java Bestand weergeven

@@ -50,6 +50,8 @@ public class WalletController {
50 50
         }
51 51
 
52 52
 
53
+
54
+
53 55
     }
54 56
 
55 57
 

+ 4
- 4
src/main/java/com/buecoin01/model/Block.java Bestand weergeven

@@ -21,7 +21,7 @@ public class Block {
21 21
     @Column
22 22
     private String hash;
23 23
     private String previousHash;
24
-    //private String data;
24
+    private String data;
25 25
     public String merkleRoot;
26 26
     public ArrayList<Transactions> transactionList = new ArrayList<>();
27 27
     private LocalDateTime timeStamp;
@@ -44,9 +44,9 @@ public class Block {
44 44
         return previousHash;
45 45
     }
46 46
 
47
-//    public String getData() {
48
-//        return data;
49
-//    }
47
+    public String getData() {
48
+        return data;
49
+    }
50 50
 
51 51
     public LocalDateTime getTimeStamp() {
52 52
         return timeStamp;

+ 4
- 4
src/main/java/com/buecoin01/model/Transactions.java Bestand weergeven

@@ -26,10 +26,10 @@ public class Transactions {
26 26
     private String transactionId;
27 27
     private String fromId;
28 28
     private String toId;
29
-    private float amount;
29
+    private double amount;
30 30
     private LocalDateTime timestamp;
31 31
 
32
-    public Transactions(String transactionId, String fromId, String toId, float amount, LocalDateTime timestamp) {
32
+    public Transactions(String transactionId, String fromId, String toId, double amount, LocalDateTime timestamp) {
33 33
         this.transactionId = transactionId;
34 34
         this.fromId = fromId;
35 35
         this.toId = toId;
@@ -69,11 +69,11 @@ public class Transactions {
69 69
         this.toId = toId;
70 70
     }
71 71
 
72
-    public float getAmount() {
72
+    public double getAmount() {
73 73
         return amount;
74 74
     }
75 75
 
76
-    public void setAmount(float amount) {
76
+    public void setAmount(double amount) {
77 77
         this.amount = amount;
78 78
     }
79 79
 

+ 9
- 17
src/main/java/com/buecoin01/model/Wallet.java Bestand weergeven

@@ -2,19 +2,19 @@ package com.buecoin01.model;
2 2
 
3 3
 import com.buecoin01.utility.TransactionInput;
4 4
 import com.buecoin01.utility.TransactionOutput;
5
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
6
+import org.hibernate.annotations.Proxy;
7
+import org.springframework.stereotype.Component;
5 8
 
6 9
 import javax.persistence.*;
7 10
 import java.security.*;
8
-import java.util.ArrayList;
9
-import java.util.HashMap;
10
-import java.util.Map;
11
+
11 12
 
12 13
 @Entity
14
+@Component
15
+@Proxy(lazy = false)
13 16
 public class Wallet {
14 17
 
15
-    private PrivateKey privateKey;
16
-    private PublicKey publicKey;
17
-    public HashMap<String, TransactionOutput> UTXOs = new HashMap<>(); // only UTXOs owned by this wallet
18 18
     @Id
19 19
     @Column(name = "id")
20 20
     @GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -22,7 +22,7 @@ public class Wallet {
22 22
     @Column(name = "pubicId")
23 23
     private String publicId;
24 24
     @Column(name = "amount")
25
-    private long amount;
25
+    private double amount;
26 26
     @Column(name = "name")
27 27
     private String name;
28 28
 
@@ -43,19 +43,11 @@ public class Wallet {
43 43
         this.name = name;
44 44
     }
45 45
 
46
-    public PrivateKey getPrivateKey() {
47
-        return privateKey;
48
-    }
49
-
50
-    public PublicKey getPublicKey() {
51
-        return publicKey;
52
-    }
53
-
54
-    public long getAmount() {
46
+    public double getAmount() {
55 47
         return amount;
56 48
     }
57 49
 
58
-    public void setAmount(long amount) {
50
+    public void setAmount(double amount) {
59 51
         this.amount = amount;
60 52
     }
61 53
 

+ 7
- 7
src/main/resources/application.properties Bestand weergeven

@@ -1,11 +1,11 @@
1 1
 spring.jpa.hibernate.ddl-auto=update
2
+
2 3
 spring.datasource.url=jdbc:mysql://167.99.50.8:3306/bitcoin?useSSL=false
3 4
 spring.datasource.username=root
4 5
 spring.datasource.password=098poilkj
5
-#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
6
-#spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
7
-#spring.datasource.testWhileIdle = true
8
-#spring.datasource.validationQuery = SELECT 1
9
-#
10
-#
11
-#logging.file= ./application.log
6
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
7
+spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
8
+spring.datasource.testWhileIdle = true
9
+spring.datasource.validationQuery = SELECT 1
10
+
11
+

+ 7
- 7
target/classes/application.properties Bestand weergeven

@@ -1,11 +1,11 @@
1 1
 spring.jpa.hibernate.ddl-auto=update
2
+
2 3
 spring.datasource.url=jdbc:mysql://167.99.50.8:3306/bitcoin?useSSL=false
3 4
 spring.datasource.username=root
4 5
 spring.datasource.password=098poilkj
5
-#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
6
-#spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
7
-#spring.datasource.testWhileIdle = true
8
-#spring.datasource.validationQuery = SELECT 1
9
-#
10
-#
11
-#logging.file= ./application.log
6
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
7
+spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
8
+spring.datasource.testWhileIdle = true
9
+spring.datasource.validationQuery = SELECT 1
10
+
11
+

BIN
target/classes/com/buecoin01/ProcessLoader.class Bestand weergeven


BIN
target/classes/com/buecoin01/controller/ConductTransactions.class Bestand weergeven


BIN
target/classes/com/buecoin01/controller/TransactionController$UserController.class Bestand weergeven


BIN
target/classes/com/buecoin01/controller/TransactionController.class Bestand weergeven


BIN
target/classes/com/buecoin01/model/Block.class Bestand weergeven


BIN
target/classes/com/buecoin01/model/Transactions.class Bestand weergeven


BIN
target/classes/com/buecoin01/model/Wallet.class Bestand weergeven