Browse Source

most working back end, codnductTransactionsmoney transfer method needs refactor

BlackJack 6 years ago
parent
commit
3482d52bf4

+ 242
- 211
.idea/workspace.xml View File

3
   <component name="ChangeListManager">
3
   <component name="ChangeListManager">
4
     <list default="true" id="86492085-3833-4394-8353-122bd8bc6cb0" name="Default" comment="">
4
     <list default="true" id="86492085-3833-4394-8353-122bd8bc6cb0" name="Default" comment="">
5
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
5
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
+      <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" />
7
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/TransactionRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/TransactionRepository.java" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/WalletRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/WalletRepository.java" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/BlockController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/BlockController.java" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java" afterDir="false" />
6
       <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" />
11
       <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" />
12
+      <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" />
13
+      <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" />
14
+      <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" />
15
+      <change beforePath="$PROJECT_DIR$/src/main/resources/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.properties" afterDir="false" />
16
+      <change beforePath="$PROJECT_DIR$/target/classes/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/application.properties" afterDir="false" />
17
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/ProcessLoader.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/buecoin01/ProcessLoader.class" afterDir="false" />
18
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/Repositories/WalletRepository.class" beforeDir="false" />
19
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/controller/BlockController$UserController.class" beforeDir="false" />
20
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/controller/BlockController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/buecoin01/controller/BlockController.class" afterDir="false" />
21
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/controller/ConductTransactions.class" beforeDir="false" />
22
+      <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" />
23
+      <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" />
24
+      <change beforePath="$PROJECT_DIR$/target/classes/com/buecoin01/model/Wallet.class" beforeDir="false" />
7
     </list>
25
     </list>
8
     <ignored path="$PROJECT_DIR$/target/" />
26
     <ignored path="$PROJECT_DIR$/target/" />
9
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
27
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
13
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
31
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14
     <option name="LAST_RESOLUTION" value="IGNORE" />
32
     <option name="LAST_RESOLUTION" value="IGNORE" />
15
   </component>
33
   </component>
34
+  <component name="DatabaseView">
35
+    <option name="SHOW_INTERMEDIATE" value="true" />
36
+    <option name="GROUP_DATA_SOURCES" value="true" />
37
+    <option name="GROUP_SCHEMA" value="true" />
38
+    <option name="GROUP_CONTENTS" value="false" />
39
+    <option name="SORT_POSITIONED" value="false" />
40
+    <option name="SHOW_EMPTY_GROUPS" value="false" />
41
+    <option name="AUTO_SCROLL_FROM_SOURCE" value="false" />
42
+    <option name="HIDDEN_KINDS">
43
+      <set />
44
+    </option>
45
+    <expand />
46
+    <select />
47
+  </component>
16
   <component name="FileEditorManager">
48
   <component name="FileEditorManager">
17
-    <leaf>
18
-      <file leaf-file-name="Wallet.java" pinned="false" current-in-tab="false">
19
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java">
49
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
50
+      <file leaf-file-name="TransactionController.java" pinned="false" current-in-tab="true">
51
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java">
20
           <provider selected="true" editor-type-id="text-editor">
52
           <provider selected="true" editor-type-id="text-editor">
21
-            <state relative-caret-position="139">
22
-              <caret line="16" lean-forward="true" selection-start-line="16" selection-end-line="16" />
53
+            <state relative-caret-position="430">
54
+              <caret line="47" column="58" lean-forward="true" selection-start-line="47" selection-start-column="58" selection-end-line="47" selection-end-column="58" />
23
               <folding>
55
               <folding>
24
                 <element signature="imports" expanded="true" />
56
                 <element signature="imports" expanded="true" />
25
               </folding>
57
               </folding>
27
           </provider>
59
           </provider>
28
         </entry>
60
         </entry>
29
       </file>
61
       </file>
30
-      <file leaf-file-name="ConductTransactions.java" pinned="false" current-in-tab="false">
31
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java">
62
+      <file leaf-file-name="Transactions.java" pinned="false" current-in-tab="false">
63
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java">
32
           <provider selected="true" editor-type-id="text-editor">
64
           <provider selected="true" editor-type-id="text-editor">
33
-            <state relative-caret-position="480">
34
-              <caret line="34" column="38" selection-start-line="34" selection-start-column="38" selection-end-line="34" selection-end-column="38" />
65
+            <state relative-caret-position="132">
66
+              <caret line="9" column="13" selection-start-line="9" selection-start-column="13" selection-end-line="9" selection-end-column="13" />
35
               <folding>
67
               <folding>
36
                 <element signature="imports" expanded="true" />
68
                 <element signature="imports" expanded="true" />
69
+                <element signature="e#1108#1109#0" expanded="true" />
70
+                <element signature="e#1137#1138#0" expanded="true" />
37
               </folding>
71
               </folding>
38
             </state>
72
             </state>
39
           </provider>
73
           </provider>
40
         </entry>
74
         </entry>
41
       </file>
75
       </file>
42
-      <file leaf-file-name="Application.java" pinned="false" current-in-tab="false">
43
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Application.java">
76
+      <file leaf-file-name="Block.java" pinned="false" current-in-tab="false">
77
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java">
44
           <provider selected="true" editor-type-id="text-editor">
78
           <provider selected="true" editor-type-id="text-editor">
45
-            <state relative-caret-position="60">
46
-              <caret line="6" column="22" selection-start-line="6" selection-start-column="22" selection-end-line="6" selection-end-column="22" />
79
+            <state relative-caret-position="15">
80
+              <caret line="12" column="10" selection-start-line="12" selection-start-column="10" selection-end-line="12" selection-end-column="10" />
47
             </state>
81
             </state>
48
           </provider>
82
           </provider>
49
         </entry>
83
         </entry>
50
       </file>
84
       </file>
51
-      <file leaf-file-name="WalletController.java" pinned="false" current-in-tab="false">
52
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java">
85
+      <file leaf-file-name="ConductTransactions.java" pinned="false" current-in-tab="false">
86
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java">
53
           <provider selected="true" editor-type-id="text-editor">
87
           <provider selected="true" editor-type-id="text-editor">
54
-            <state relative-caret-position="258">
55
-              <caret line="26" column="71" lean-forward="true" selection-start-line="26" selection-start-column="71" selection-end-line="26" selection-end-column="71" />
88
+            <state relative-caret-position="292">
89
+              <caret line="34" column="77" selection-start-line="34" selection-start-column="77" selection-end-line="34" selection-end-column="77" />
56
               <folding>
90
               <folding>
57
                 <element signature="imports" expanded="true" />
91
                 <element signature="imports" expanded="true" />
58
               </folding>
92
               </folding>
60
           </provider>
94
           </provider>
61
         </entry>
95
         </entry>
62
       </file>
96
       </file>
63
-      <file leaf-file-name="ProcessLoader.java" pinned="false" current-in-tab="false">
64
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java">
97
+      <file leaf-file-name="BlockController.java" pinned="false" current-in-tab="false">
98
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/BlockController.java">
65
           <provider selected="true" editor-type-id="text-editor">
99
           <provider selected="true" editor-type-id="text-editor">
66
-            <state relative-caret-position="583">
67
-              <caret line="30" column="29" lean-forward="true" selection-start-line="30" selection-start-column="29" selection-end-line="30" selection-end-column="29" />
68
-              <folding>
69
-                <element signature="imports" expanded="true" />
70
-              </folding>
100
+            <state relative-caret-position="660">
101
+              <caret line="51" column="1" lean-forward="true" selection-start-line="51" selection-start-column="1" selection-end-line="51" selection-end-column="1" />
71
             </state>
102
             </state>
72
           </provider>
103
           </provider>
73
         </entry>
104
         </entry>
74
       </file>
105
       </file>
75
-      <file leaf-file-name="TransactionController.java" pinned="false" current-in-tab="false">
76
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java">
106
+      <file leaf-file-name="Wallet.java" pinned="false" current-in-tab="false">
107
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java">
77
           <provider selected="true" editor-type-id="text-editor">
108
           <provider selected="true" editor-type-id="text-editor">
78
-            <state relative-caret-position="7">
79
-              <caret line="13" selection-start-line="13" selection-end-line="13" />
109
+            <state relative-caret-position="229">
110
+              <caret line="18" column="28" lean-forward="true" selection-start-line="18" selection-start-column="28" selection-end-line="18" selection-end-column="28" />
80
               <folding>
111
               <folding>
81
                 <element signature="imports" expanded="true" />
112
                 <element signature="imports" expanded="true" />
82
               </folding>
113
               </folding>
84
           </provider>
115
           </provider>
85
         </entry>
116
         </entry>
86
       </file>
117
       </file>
87
-      <file leaf-file-name="Transactions.java" pinned="false" current-in-tab="true">
88
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java">
118
+      <file leaf-file-name="WalletRepository.java" pinned="false" current-in-tab="false">
119
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/WalletRepository.java">
89
           <provider selected="true" editor-type-id="text-editor">
120
           <provider selected="true" editor-type-id="text-editor">
90
-            <state relative-caret-position="579">
91
-              <caret line="77" column="5" lean-forward="true" selection-start-line="77" selection-start-column="5" selection-end-line="77" selection-end-column="5" />
121
+            <state relative-caret-position="195">
122
+              <caret line="13" column="17" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
92
               <folding>
123
               <folding>
93
                 <element signature="imports" expanded="true" />
124
                 <element signature="imports" expanded="true" />
94
               </folding>
125
               </folding>
96
           </provider>
127
           </provider>
97
         </entry>
128
         </entry>
98
       </file>
129
       </file>
99
-      <file leaf-file-name="application.properties" pinned="false" current-in-tab="false">
100
-        <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
101
-          <provider selected="true" editor-type-id="text-editor">
102
-            <state relative-caret-position="30">
103
-              <caret line="2" column="44" selection-start-line="2" selection-start-column="42" selection-end-line="2" selection-end-column="44" />
104
-            </state>
105
-          </provider>
106
-        </entry>
107
-      </file>
108
     </leaf>
130
     </leaf>
109
   </component>
131
   </component>
110
   <component name="FileTemplateManagerImpl">
132
   <component name="FileTemplateManagerImpl">
119
   <component name="FindInProjectRecents">
141
   <component name="FindInProjectRecents">
120
     <findStrings>
142
     <findStrings>
121
       <find>WalletRepository</find>
143
       <find>WalletRepository</find>
144
+      <find>testWhileIdle</find>
122
     </findStrings>
145
     </findStrings>
123
     <replaceStrings>
146
     <replaceStrings>
124
       <replace>TransactionRepository</replace>
147
       <replace>TransactionRepository</replace>
131
   <component name="IdeDocumentHistory">
154
   <component name="IdeDocumentHistory">
132
     <option name="CHANGED_PATHS">
155
     <option name="CHANGED_PATHS">
133
       <list>
156
       <list>
134
-        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/WalletRepository.java" />
135
-        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/BlockController.java" />
136
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/BlockchainVerification.java" />
157
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/BlockchainVerification.java" />
137
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transaction.java" />
158
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transaction.java" />
138
-        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/TransactionRepository.java" />
139
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/EnableMongoRepositories.java" />
159
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/EnableMongoRepositories.java" />
140
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/Application.java" />
160
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/Application.java" />
161
+        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java" />
162
+        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/BlockController.java" />
141
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java" />
163
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java" />
142
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java" />
164
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java" />
143
-        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java" />
165
+        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/TransactionRepository.java" />
144
         <option value="$PROJECT_DIR$/src/main/resources/application.properties" />
166
         <option value="$PROJECT_DIR$/src/main/resources/application.properties" />
167
+        <option value="$APPLICATION_CONFIG_DIR$/consoles/db/9e5d39f9-b664-4d5a-a0eb-fa8b2386a1ce/console.sql" />
145
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java" />
168
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java" />
146
-        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java" />
169
+        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/utility/Encryption.java" />
147
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java" />
170
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java" />
171
+        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/WalletRepository.java" />
172
+        <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java" />
148
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java" />
173
         <option value="$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java" />
149
       </list>
174
       </list>
150
     </option>
175
     </option>
165
   <component name="NodePackageJsonFileManager">
190
   <component name="NodePackageJsonFileManager">
166
     <packageJsonPaths />
191
     <packageJsonPaths />
167
   </component>
192
   </component>
168
-  <component name="ProjectFrameBounds" fullScreen="true">
169
-    <option name="x" value="-213" />
193
+  <component name="ProjectFrameBounds" extendedState="6" fullScreen="true">
194
+    <option name="x" value="-372" />
170
     <option name="y" value="-1080" />
195
     <option name="y" value="-1080" />
171
     <option name="width" value="1920" />
196
     <option name="width" value="1920" />
172
     <option name="height" value="1080" />
197
     <option name="height" value="1080" />
177
       <foldersAlwaysOnTop value="true" />
202
       <foldersAlwaysOnTop value="true" />
178
     </navigator>
203
     </navigator>
179
     <panes>
204
     <panes>
180
-      <pane id="AndroidView" />
181
       <pane id="PackagesPane" />
205
       <pane id="PackagesPane" />
182
       <pane id="Scope" />
206
       <pane id="Scope" />
207
+      <pane id="AndroidView" />
183
       <pane id="ProjectPane">
208
       <pane id="ProjectPane">
184
         <subPane>
209
         <subPane>
185
           <expand>
210
           <expand>
219
               <item name="src" type="462c0819:PsiDirectoryNode" />
244
               <item name="src" type="462c0819:PsiDirectoryNode" />
220
               <item name="main" type="462c0819:PsiDirectoryNode" />
245
               <item name="main" type="462c0819:PsiDirectoryNode" />
221
               <item name="java" type="462c0819:PsiDirectoryNode" />
246
               <item name="java" type="462c0819:PsiDirectoryNode" />
222
-              <item name="buecoin01" type="462c0819:PsiDirectoryNode" />
223
               <item name="controller" type="462c0819:PsiDirectoryNode" />
247
               <item name="controller" type="462c0819:PsiDirectoryNode" />
224
             </path>
248
             </path>
225
             <path>
249
             <path>
228
               <item name="src" type="462c0819:PsiDirectoryNode" />
252
               <item name="src" type="462c0819:PsiDirectoryNode" />
229
               <item name="main" type="462c0819:PsiDirectoryNode" />
253
               <item name="main" type="462c0819:PsiDirectoryNode" />
230
               <item name="java" type="462c0819:PsiDirectoryNode" />
254
               <item name="java" type="462c0819:PsiDirectoryNode" />
231
-              <item name="buecoin01" type="462c0819:PsiDirectoryNode" />
232
               <item name="model" type="462c0819:PsiDirectoryNode" />
255
               <item name="model" type="462c0819:PsiDirectoryNode" />
233
             </path>
256
             </path>
234
             <path>
257
             <path>
236
               <item name="CryptoCoin" type="462c0819:PsiDirectoryNode" />
259
               <item name="CryptoCoin" type="462c0819:PsiDirectoryNode" />
237
               <item name="src" type="462c0819:PsiDirectoryNode" />
260
               <item name="src" type="462c0819:PsiDirectoryNode" />
238
               <item name="main" type="462c0819:PsiDirectoryNode" />
261
               <item name="main" type="462c0819:PsiDirectoryNode" />
262
+              <item name="java" type="462c0819:PsiDirectoryNode" />
263
+              <item name="Repositories" type="462c0819:PsiDirectoryNode" />
264
+            </path>
265
+            <path>
266
+              <item name="0.1" type="b2602c69:ProjectViewProjectNode" />
267
+              <item name="CryptoCoin" type="462c0819:PsiDirectoryNode" />
268
+              <item name="src" type="462c0819:PsiDirectoryNode" />
269
+              <item name="main" type="462c0819:PsiDirectoryNode" />
270
+              <item name="java" type="462c0819:PsiDirectoryNode" />
271
+              <item name="utility" type="462c0819:PsiDirectoryNode" />
272
+            </path>
273
+            <path>
274
+              <item name="0.1" type="b2602c69:ProjectViewProjectNode" />
275
+              <item name="CryptoCoin" type="462c0819:PsiDirectoryNode" />
276
+              <item name="src" type="462c0819:PsiDirectoryNode" />
277
+              <item name="main" type="462c0819:PsiDirectoryNode" />
239
               <item name="resources" type="462c0819:PsiDirectoryNode" />
278
               <item name="resources" type="462c0819:PsiDirectoryNode" />
240
             </path>
279
             </path>
241
           </expand>
280
           </expand>
251
     <property name="RequestMappingsPanelWidth1" value="75" />
290
     <property name="RequestMappingsPanelWidth1" value="75" />
252
     <property name="WebServerToolWindowFactoryState" value="false" />
291
     <property name="WebServerToolWindowFactoryState" value="false" />
253
     <property name="aspect.path.notification.shown" value="true" />
292
     <property name="aspect.path.notification.shown" value="true" />
293
+    <property name="com.intellij.database.dataSource.DataSourceTemplate" value="MySQL" />
294
+    <property name="database.console.LAST_STATE" value="true" />
254
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
295
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
255
     <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
296
     <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
256
   </component>
297
   </component>
350
       <updated>1532357794192</updated>
391
       <updated>1532357794192</updated>
351
       <workItem from="1532357795573" duration="4040000" />
392
       <workItem from="1532357795573" duration="4040000" />
352
       <workItem from="1532473422589" duration="716000" />
393
       <workItem from="1532473422589" duration="716000" />
394
+      <workItem from="1533219920414" duration="25981000" />
353
     </task>
395
     </task>
354
     <servers />
396
     <servers />
355
   </component>
397
   </component>
356
   <component name="TimeTrackingManager">
398
   <component name="TimeTrackingManager">
357
-    <option name="totallyTimeSpent" value="16177000" />
399
+    <option name="totallyTimeSpent" value="44474000" />
358
   </component>
400
   </component>
359
   <component name="ToolWindowManager">
401
   <component name="ToolWindowManager">
360
-    <frame x="-213" y="-1080" width="1920" height="1080" extended-state="0" />
402
+    <frame x="-372" y="-1080" width="1920" height="1080" extended-state="6" />
403
+    <editor active="true" />
361
     <layout>
404
     <layout>
362
-      <window_info anchor="right" id="Palette" />
363
-      <window_info anchor="bottom" id="Event Log" side_tool="true" />
364
-      <window_info anchor="right" id="Maven Projects" />
365
-      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
366
-      <window_info id="Capture Tool" />
367
-      <window_info id="Designer" />
368
-      <window_info anchor="right" id="Database" />
405
+      <window_info anchor="right" id="Palette" order="3" />
406
+      <window_info anchor="bottom" id="Event Log" order="14" sideWeight="0.5005325" side_tool="true" weight="0.43383086" />
407
+      <window_info anchor="right" id="Maven Projects" order="5" />
408
+      <window_info anchor="bottom" id="Database Changes" order="12" show_stripe_button="false" />
409
+      <window_info id="Capture Tool" order="7" />
410
+      <window_info id="Designer" order="2" />
411
+      <window_info anchor="right" id="Database" order="6" weight="0.10915868" />
369
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
412
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
370
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
413
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
371
-      <window_info id="UI Designer" />
372
-      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
373
-      <window_info anchor="bottom" id="TODO" order="6" />
374
-      <window_info anchor="bottom" id="Messages" />
375
-      <window_info anchor="right" id="Palette&#9;" />
376
-      <window_info id="Image Layers" />
377
-      <window_info anchor="bottom" id="Java Enterprise" />
378
-      <window_info anchor="right" id="Capture Analysis" />
379
-      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.32892057" />
380
-      <window_info anchor="bottom" id="Version Control" />
381
-      <window_info anchor="bottom" id="Spring" />
382
-      <window_info anchor="bottom" id="Terminal" weight="0.23727088" />
383
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.185836" />
384
-      <window_info anchor="right" id="Bean Validation" />
385
-      <window_info id="Web" side_tool="true" />
386
-      <window_info anchor="right" id="Theme Preview" />
387
-      <window_info id="Favorites" side_tool="true" />
388
-      <window_info id="Designer" order="5" />
389
-      <window_info anchor="right" id="Palette" order="6" />
390
-      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.3299389" />
391
-      <window_info anchor="bottom" id="Spring" order="10" />
392
-      <window_info id="Image Layers" order="5" />
414
+      <window_info id="UI Designer" order="4" />
415
+      <window_info anchor="bottom" id="Debug" order="4" weight="0.4" />
416
+      <window_info anchor="bottom" id="TODO" order="7" />
417
+      <window_info anchor="bottom" id="Messages" order="8" weight="0.27462685" />
418
+      <window_info anchor="right" id="Palette&#9;" order="7" />
419
+      <window_info id="Image Layers" order="3" />
420
+      <window_info anchor="bottom" id="Java Enterprise" order="11" />
421
+      <window_info anchor="right" id="Capture Analysis" order="4" />
422
+      <window_info anchor="bottom" id="Version Control" order="13" />
423
+      <window_info active="true" anchor="bottom" id="Run" order="3" sideWeight="0.49946752" visible="true" weight="0.43383086" />
424
+      <window_info anchor="bottom" id="Spring" order="9" weight="0.32935324" />
425
+      <window_info anchor="bottom" id="Terminal" order="10" weight="0.32965517" />
426
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.17092651" />
427
+      <window_info anchor="right" id="Bean Validation" order="9" />
428
+      <window_info id="Web" order="6" side_tool="true" />
429
+      <window_info anchor="bottom" id="Find" order="2" />
430
+      <window_info anchor="right" id="Theme Preview" order="8" />
431
+      <window_info id="Favorites" order="5" side_tool="true" />
432
+      <window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
433
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
434
+      <window_info anchor="bottom" id="Database Console" order="0" weight="0.32935324" />
435
+      <window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
436
+      <window_info anchor="bottom" id="Message" order="1" />
437
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
438
+    </layout>
439
+    <layout-to-restore>
440
+      <window_info id="Designer" order="2" />
441
+      <window_info anchor="bottom" id="Database Console" order="0" weight="0.32935324" />
442
+      <window_info anchor="right" id="Palette" order="3" />
443
+      <window_info active="true" anchor="bottom" id="Run" order="3" sideWeight="0.49946752" visible="true" weight="0.43383086" />
444
+      <window_info anchor="bottom" id="Spring" order="9" />
445
+      <window_info id="Image Layers" order="3" />
393
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
446
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
394
-      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
447
+      <window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
395
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
448
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
396
-      <window_info id="UI Designer" order="5" />
449
+      <window_info id="UI Designer" order="4" />
397
       <window_info id="Favorites" order="5" side_tool="true" />
450
       <window_info id="Favorites" order="5" side_tool="true" />
398
-      <window_info anchor="bottom" id="Terminal" order="10" />
399
-      <window_info id="Capture Tool" order="5" />
400
-      <window_info anchor="right" id="Capture Analysis" order="6" />
401
-      <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
402
-      <window_info anchor="bottom" id="Messages" order="9" weight="0.27492878" />
403
-      <window_info anchor="bottom" id="TODO" order="6" />
451
+      <window_info anchor="bottom" id="Terminal" order="10" weight="0.32965517" />
452
+      <window_info id="Capture Tool" order="7" />
453
+      <window_info anchor="right" id="Capture Analysis" order="4" />
454
+      <window_info anchor="bottom" id="Event Log" order="14" sideWeight="0.5005325" side_tool="true" weight="0.43383086" />
455
+      <window_info anchor="bottom" id="Messages" order="8" weight="0.27462685" />
456
+      <window_info anchor="bottom" id="TODO" order="7" />
404
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
457
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
405
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.30298188" />
406
-      <window_info anchor="bottom" id="Java Enterprise" order="10" />
407
-      <window_info anchor="bottom" id="Database Changes" order="10" show_stripe_button="false" />
408
-      <window_info anchor="bottom" id="Version Control" order="10" />
409
-      <window_info anchor="right" id="Maven Projects" order="6" />
410
-      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
411
-      <window_info anchor="right" id="Database" order="6" />
412
-      <window_info anchor="bottom" id="Message" order="0" />
413
-      <window_info id="Web" order="5" side_tool="true" />
414
-      <window_info anchor="right" id="Palette&#9;" order="6" />
415
-      <window_info anchor="right" id="Theme Preview" order="6" />
458
+      <window_info anchor="bottom" id="Java Enterprise" order="11" />
459
+      <window_info anchor="bottom" id="Database Changes" order="12" show_stripe_button="false" />
460
+      <window_info anchor="bottom" id="Version Control" order="13" />
461
+      <window_info anchor="right" id="Maven Projects" order="5" />
462
+      <window_info anchor="bottom" id="Find" order="2" />
463
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.17092651" />
464
+      <window_info anchor="right" id="Database" order="6" weight="0.10915868" />
465
+      <window_info anchor="bottom" id="Message" order="1" />
466
+      <window_info id="Web" order="6" side_tool="true" />
467
+      <window_info anchor="right" id="Palette&#9;" order="7" />
468
+      <window_info anchor="right" id="Theme Preview" order="8" />
416
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
469
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
417
-      <window_info anchor="bottom" id="Find" order="1" />
418
-      <window_info anchor="right" id="Bean Validation" order="6" />
419
-      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
420
-    </layout>
421
-    <layout-to-restore>
422
-      <window_info id="Designer" order="0" />
423
-      <window_info anchor="right" id="Palette" order="0" />
424
-      <window_info anchor="bottom" id="Spring" order="0" />
425
-      <window_info id="Image Layers" order="1" />
426
-      <window_info anchor="bottom" id="Run" order="8" />
427
-      <window_info anchor="bottom" id="Cvs" order="10" weight="0.25" />
428
-      <window_info anchor="right" id="Ant Build" order="8" weight="0.25" />
429
-      <window_info id="UI Designer" order="2" />
430
-      <window_info id="Favorites" order="3" side_tool="true" />
431
-      <window_info anchor="bottom" id="Terminal" order="1" />
432
-      <window_info id="Capture Tool" order="4" />
433
-      <window_info anchor="right" id="Capture Analysis" order="1" />
434
-      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="7" type="SLIDING" weight="0.4" />
435
-      <window_info anchor="bottom" id="Event Log" order="2" side_tool="true" />
436
-      <window_info anchor="bottom" id="TODO" order="12" />
437
-      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="9" weight="0.25" />
438
-      <window_info anchor="bottom" id="Java Enterprise" order="3" />
439
-      <window_info anchor="bottom" id="Database Changes" order="4" show_stripe_button="false" />
440
-      <window_info anchor="bottom" id="Version Control" order="5" />
441
-      <window_info anchor="right" id="Maven Projects" order="2" />
442
-      <window_info anchor="bottom" id="Find" order="7" />
443
-      <window_info active="true" content_ui="combo" id="Project" order="6" visible="true" weight="0.24973376" />
444
-      <window_info anchor="right" id="Database" order="3" />
445
-      <window_info anchor="bottom" id="Message" order="6" />
446
-      <window_info id="Web" order="5" side_tool="true" />
447
-      <window_info anchor="right" id="Palette&#9;" order="4" />
448
-      <window_info anchor="right" id="Theme Preview" order="5" />
449
-      <window_info id="Structure" order="7" side_tool="true" weight="0.25" />
450
-      <window_info anchor="bottom" id="Inspection" order="11" weight="0.4" />
451
-      <window_info anchor="bottom" id="Debug" order="9" weight="0.4" />
452
-      <window_info anchor="right" id="Bean Validation" order="6" />
470
+      <window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
471
+      <window_info anchor="bottom" id="Debug" order="4" weight="0.4" />
472
+      <window_info anchor="right" id="Bean Validation" order="9" />
453
     </layout-to-restore>
473
     </layout-to-restore>
454
   </component>
474
   </component>
455
   <component name="TypeScriptGeneratedFilesManager">
475
   <component name="TypeScriptGeneratedFilesManager">
458
   <component name="VcsContentAnnotationSettings">
478
   <component name="VcsContentAnnotationSettings">
459
     <option name="myLimit" value="2678400000" />
479
     <option name="myLimit" value="2678400000" />
460
   </component>
480
   </component>
481
+  <component name="XDebuggerManager">
482
+    <breakpoint-manager>
483
+      <option name="time" value="1" />
484
+    </breakpoint-manager>
485
+  </component>
461
   <component name="editorHistoryManager">
486
   <component name="editorHistoryManager">
462
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/CoinRepository.java" />
463
     <entry file="file://$PROJECT_DIR$/src/test/java/com/buecoin01/ApplicationTests.java">
487
     <entry file="file://$PROJECT_DIR$/src/test/java/com/buecoin01/ApplicationTests.java">
464
       <provider selected="true" editor-type-id="text-editor">
488
       <provider selected="true" editor-type-id="text-editor">
465
         <state relative-caret-position="90">
489
         <state relative-caret-position="90">
471
       <provider selected="true" editor-type-id="text-editor">
495
       <provider selected="true" editor-type-id="text-editor">
472
         <state relative-caret-position="945">
496
         <state relative-caret-position="945">
473
           <caret line="78" selection-start-line="78" selection-end-line="78" />
497
           <caret line="78" selection-start-line="78" selection-end-line="78" />
474
-          <folding>
475
-            <element signature="e#969#970#0" expanded="true" />
476
-            <element signature="e#996#997#0" expanded="true" />
477
-          </folding>
478
         </state>
498
         </state>
479
       </provider>
499
       </provider>
480
     </entry>
500
     </entry>
586
       <provider selected="true" editor-type-id="text-editor">
606
       <provider selected="true" editor-type-id="text-editor">
587
         <state relative-caret-position="318">
607
         <state relative-caret-position="318">
588
           <caret line="117" column="26" selection-start-line="117" selection-start-column="26" selection-end-line="117" selection-end-column="26" />
608
           <caret line="117" column="26" selection-start-line="117" selection-start-column="26" selection-end-line="117" selection-end-column="26" />
589
-          <folding>
590
-            <element signature="imports" expanded="true" />
591
-          </folding>
592
-        </state>
593
-      </provider>
594
-    </entry>
595
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/utility/TransactionInput.java">
596
-      <provider selected="true" editor-type-id="text-editor">
597
-        <state relative-caret-position="120">
598
-          <caret line="8" column="10" selection-start-line="8" selection-start-column="10" selection-end-line="8" selection-end-column="10" />
599
-        </state>
600
-      </provider>
601
-    </entry>
602
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/utility/TransactionOutput.java">
603
-      <provider selected="true" editor-type-id="text-editor">
604
-        <state relative-caret-position="314">
605
-          <caret line="25" column="38" selection-start-line="25" selection-start-column="38" selection-end-line="25" selection-end-column="38" />
606
-        </state>
607
-      </provider>
608
-    </entry>
609
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/utility/Encryption.java">
610
-      <provider selected="true" editor-type-id="text-editor">
611
-        <state relative-caret-position="-26">
612
-          <caret line="18" column="49" selection-start-line="18" selection-start-column="49" selection-end-line="18" selection-end-column="49" />
613
-          <folding>
614
-            <element signature="imports" expanded="true" />
615
-            <element signature="e#1724#1725#0" expanded="true" />
616
-          </folding>
617
         </state>
609
         </state>
618
       </provider>
610
       </provider>
619
     </entry>
611
     </entry>
659
       <provider selected="true" editor-type-id="text-editor" />
651
       <provider selected="true" editor-type-id="text-editor" />
660
     </entry>
652
     </entry>
661
     <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Coin.java" />
653
     <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Coin.java" />
654
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/EnableMongoRepositories.java" />
662
     <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/BlockchainVerification.java">
655
     <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/BlockchainVerification.java">
663
       <provider selected="true" editor-type-id="text-editor">
656
       <provider selected="true" editor-type-id="text-editor">
664
-        <state relative-caret-position="285">
657
+        <state relative-caret-position="-144">
665
           <caret line="19" column="2" selection-start-line="19" selection-start-column="2" selection-end-line="19" selection-end-column="2" />
658
           <caret line="19" column="2" selection-start-line="19" selection-start-column="2" selection-end-line="19" selection-end-column="2" />
666
         </state>
659
         </state>
667
       </provider>
660
       </provider>
668
     </entry>
661
     </entry>
669
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/EnableMongoRepositories.java" />
670
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/BlockRepository.java">
662
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java">
671
       <provider selected="true" editor-type-id="text-editor">
663
       <provider selected="true" editor-type-id="text-editor">
672
-        <state relative-caret-position="75">
673
-          <caret line="8" column="1" selection-start-line="8" selection-end-line="9" />
664
+        <state relative-caret-position="251">
665
+          <caret line="29" column="21" lean-forward="true" selection-start-line="29" selection-start-column="21" selection-end-line="29" selection-end-column="21" />
666
+          <folding>
667
+            <element signature="imports" expanded="true" />
668
+          </folding>
674
         </state>
669
         </state>
675
       </provider>
670
       </provider>
676
     </entry>
671
     </entry>
677
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/BlockController.java">
672
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/utility/TransactionInput.java">
678
       <provider selected="true" editor-type-id="text-editor">
673
       <provider selected="true" editor-type-id="text-editor">
679
-        <state relative-caret-position="639">
680
-          <caret line="47" column="40" selection-start-line="47" selection-start-column="40" selection-end-line="47" selection-end-column="40" />
674
+        <state relative-caret-position="120">
675
+          <caret line="8" column="10" selection-start-line="8" selection-start-column="10" selection-end-line="8" selection-end-column="10" />
681
         </state>
676
         </state>
682
       </provider>
677
       </provider>
683
     </entry>
678
     </entry>
684
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java">
679
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/utility/TransactionOutput.java">
685
       <provider selected="true" editor-type-id="text-editor">
680
       <provider selected="true" editor-type-id="text-editor">
686
-        <state relative-caret-position="148">
687
-          <caret line="14" lean-forward="true" selection-start-line="14" selection-end-line="14" />
681
+        <state relative-caret-position="64">
682
+          <caret line="25" column="38" selection-start-line="25" selection-start-column="38" selection-end-line="25" selection-end-column="38" />
688
           <folding>
683
           <folding>
689
-            <element signature="e#969#970#0" expanded="true" />
690
-            <element signature="e#996#997#0" expanded="true" />
684
+            <element signature="e#813#814#0" expanded="true" />
691
           </folding>
685
           </folding>
692
         </state>
686
         </state>
693
       </provider>
687
       </provider>
694
     </entry>
688
     </entry>
695
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/WalletRepository.java">
689
+    <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/9e5d39f9-b664-4d5a-a0eb-fa8b2386a1ce/console.sql">
696
       <provider selected="true" editor-type-id="text-editor">
690
       <provider selected="true" editor-type-id="text-editor">
697
         <state>
691
         <state>
698
-          <caret column="35" lean-forward="true" selection-start-column="35" selection-end-column="35" />
692
+          <caret column="34" selection-start-column="34" selection-end-column="34" />
699
         </state>
693
         </state>
700
       </provider>
694
       </provider>
701
     </entry>
695
     </entry>
702
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/TransactionRepository.java">
696
+    <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
703
       <provider selected="true" editor-type-id="text-editor">
697
       <provider selected="true" editor-type-id="text-editor">
704
-        <state relative-caret-position="90">
705
-          <caret line="6" column="59" lean-forward="true" selection-start-line="6" selection-start-column="59" selection-end-line="6" selection-end-column="59" />
698
+        <state relative-caret-position="150">
699
+          <caret line="10" lean-forward="true" selection-start-line="10" selection-end-line="10" />
706
         </state>
700
         </state>
707
       </provider>
701
       </provider>
708
     </entry>
702
     </entry>
709
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/ProcessLoader.java">
703
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/BlockRepository.java">
710
       <provider selected="true" editor-type-id="text-editor">
704
       <provider selected="true" editor-type-id="text-editor">
711
-        <state relative-caret-position="583">
712
-          <caret line="30" column="29" lean-forward="true" selection-start-line="30" selection-start-column="29" selection-end-line="30" selection-end-column="29" />
705
+        <state relative-caret-position="75">
706
+          <caret line="8" column="1" selection-start-line="8" selection-end-line="9" />
707
+        </state>
708
+      </provider>
709
+    </entry>
710
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/utility/Encryption.java">
711
+      <provider selected="true" editor-type-id="text-editor">
712
+        <state relative-caret-position="174">
713
+          <caret line="14" selection-start-line="14" selection-end-line="14" />
713
           <folding>
714
           <folding>
714
             <element signature="imports" expanded="true" />
715
             <element signature="imports" expanded="true" />
716
+            <element signature="e#523#524#0" expanded="true" />
717
+            <element signature="e#597#598#0" expanded="true" />
718
+            <element signature="e#1661#1662#0" expanded="true" />
719
+            <element signature="e#1736#1737#0" expanded="true" />
715
           </folding>
720
           </folding>
716
         </state>
721
         </state>
717
       </provider>
722
       </provider>
718
     </entry>
723
     </entry>
719
-    <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
724
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Application.java">
720
       <provider selected="true" editor-type-id="text-editor">
725
       <provider selected="true" editor-type-id="text-editor">
721
-        <state relative-caret-position="30">
722
-          <caret line="2" column="44" selection-start-line="2" selection-start-column="42" selection-end-line="2" selection-end-column="44" />
726
+        <state relative-caret-position="135">
727
+          <caret line="11" selection-start-line="11" selection-end-line="11" />
723
         </state>
728
         </state>
724
       </provider>
729
       </provider>
725
     </entry>
730
     </entry>
726
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Application.java">
731
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/BlockController.java">
727
       <provider selected="true" editor-type-id="text-editor">
732
       <provider selected="true" editor-type-id="text-editor">
728
-        <state relative-caret-position="60">
729
-          <caret line="6" column="22" selection-start-line="6" selection-start-column="22" selection-end-line="6" selection-end-column="22" />
733
+        <state relative-caret-position="660">
734
+          <caret line="51" column="1" lean-forward="true" selection-start-line="51" selection-start-column="1" selection-end-line="51" selection-end-column="1" />
730
         </state>
735
         </state>
731
       </provider>
736
       </provider>
732
     </entry>
737
     </entry>
733
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java">
738
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/TransactionRepository.java">
734
       <provider selected="true" editor-type-id="text-editor">
739
       <provider selected="true" editor-type-id="text-editor">
735
-        <state relative-caret-position="139">
736
-          <caret line="16" lean-forward="true" selection-start-line="16" selection-end-line="16" />
740
+        <state relative-caret-position="165">
741
+          <caret line="11" column="17" selection-start-line="11" selection-start-column="17" selection-end-line="11" selection-end-column="17" />
737
           <folding>
742
           <folding>
738
             <element signature="imports" expanded="true" />
743
             <element signature="imports" expanded="true" />
739
           </folding>
744
           </folding>
740
         </state>
745
         </state>
741
       </provider>
746
       </provider>
742
     </entry>
747
     </entry>
743
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java">
748
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/Repositories/WalletRepository.java">
744
       <provider selected="true" editor-type-id="text-editor">
749
       <provider selected="true" editor-type-id="text-editor">
745
-        <state relative-caret-position="258">
746
-          <caret line="26" column="71" lean-forward="true" selection-start-line="26" selection-start-column="71" selection-end-line="26" selection-end-column="71" />
750
+        <state relative-caret-position="195">
751
+          <caret line="13" column="17" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
747
           <folding>
752
           <folding>
748
             <element signature="imports" expanded="true" />
753
             <element signature="imports" expanded="true" />
749
           </folding>
754
           </folding>
750
         </state>
755
         </state>
751
       </provider>
756
       </provider>
752
     </entry>
757
     </entry>
753
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java">
758
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Wallet.java">
759
+      <provider selected="true" editor-type-id="text-editor">
760
+        <state relative-caret-position="229">
761
+          <caret line="18" column="28" lean-forward="true" selection-start-line="18" selection-start-column="28" selection-end-line="18" selection-end-column="28" />
762
+          <folding>
763
+            <element signature="imports" expanded="true" />
764
+          </folding>
765
+        </state>
766
+      </provider>
767
+    </entry>
768
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java">
754
       <provider selected="true" editor-type-id="text-editor">
769
       <provider selected="true" editor-type-id="text-editor">
755
-        <state relative-caret-position="7">
756
-          <caret line="13" selection-start-line="13" selection-end-line="13" />
770
+        <state relative-caret-position="132">
771
+          <caret line="9" column="13" selection-start-line="9" selection-start-column="13" selection-end-line="9" selection-end-column="13" />
757
           <folding>
772
           <folding>
758
             <element signature="imports" expanded="true" />
773
             <element signature="imports" expanded="true" />
774
+            <element signature="e#1108#1109#0" expanded="true" />
775
+            <element signature="e#1137#1138#0" expanded="true" />
759
           </folding>
776
           </folding>
760
         </state>
777
         </state>
761
       </provider>
778
       </provider>
762
     </entry>
779
     </entry>
780
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Block.java">
781
+      <provider selected="true" editor-type-id="text-editor">
782
+        <state relative-caret-position="15">
783
+          <caret line="12" column="10" selection-start-line="12" selection-start-column="10" selection-end-line="12" selection-end-column="10" />
784
+        </state>
785
+      </provider>
786
+    </entry>
787
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/WalletController.java">
788
+      <provider selected="true" editor-type-id="text-editor">
789
+        <state relative-caret-position="393">
790
+          <caret line="41" column="4" lean-forward="true" selection-start-line="41" selection-start-column="4" selection-end-line="41" selection-end-column="4" />
791
+        </state>
792
+      </provider>
793
+    </entry>
763
     <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java">
794
     <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/ConductTransactions.java">
764
       <provider selected="true" editor-type-id="text-editor">
795
       <provider selected="true" editor-type-id="text-editor">
765
-        <state relative-caret-position="480">
766
-          <caret line="34" column="38" selection-start-line="34" selection-start-column="38" selection-end-line="34" selection-end-column="38" />
796
+        <state relative-caret-position="292">
797
+          <caret line="34" column="77" selection-start-line="34" selection-start-column="77" selection-end-line="34" selection-end-column="77" />
767
           <folding>
798
           <folding>
768
             <element signature="imports" expanded="true" />
799
             <element signature="imports" expanded="true" />
769
           </folding>
800
           </folding>
770
         </state>
801
         </state>
771
       </provider>
802
       </provider>
772
     </entry>
803
     </entry>
773
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/model/Transactions.java">
804
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/buecoin01/controller/TransactionController.java">
774
       <provider selected="true" editor-type-id="text-editor">
805
       <provider selected="true" editor-type-id="text-editor">
775
-        <state relative-caret-position="579">
776
-          <caret line="77" column="5" lean-forward="true" selection-start-line="77" selection-start-column="5" selection-end-line="77" selection-end-column="5" />
806
+        <state relative-caret-position="430">
807
+          <caret line="47" column="58" lean-forward="true" selection-start-line="47" selection-start-column="58" selection-end-line="47" selection-end-column="58" />
777
           <folding>
808
           <folding>
778
             <element signature="imports" expanded="true" />
809
             <element signature="imports" expanded="true" />
779
           </folding>
810
           </folding>

+ 1
- 1
src/main/java/com/buecoin01/ProcessLoader.java View File

28
 
28
 
29
     @Override
29
     @Override
30
     public void run(ApplicationArguments args) {
30
     public void run(ApplicationArguments args) {
31
-        transaction.transferMoney(2L,1L,500);
31
+
32
 
32
 
33
     }
33
     }
34
 }
34
 }

+ 4
- 3
src/main/java/com/buecoin01/Repositories/TransactionRepository.java View File

1
 package com.buecoin01.Repositories;
1
 package com.buecoin01.Repositories;
2
 
2
 
3
 import com.buecoin01.model.Transactions;
3
 import com.buecoin01.model.Transactions;
4
+import com.buecoin01.model.Wallet;
4
 import org.springframework.data.jpa.repository.JpaRepository;
5
 import org.springframework.data.jpa.repository.JpaRepository;
6
+import org.springframework.data.jpa.repository.Query;
5
 import org.springframework.stereotype.Repository;
7
 import org.springframework.stereotype.Repository;
6
 import org.springframework.web.bind.annotation.CrossOrigin;
8
 import org.springframework.web.bind.annotation.CrossOrigin;
7
-import org.springframework.web.bind.annotation.RequestBody;
8
-
9
-import javax.transaction.Transaction;
10
 
9
 
11
 @CrossOrigin(origins = {"http://localhost:8100","http://localhost:8080"})
10
 @CrossOrigin(origins = {"http://localhost:8100","http://localhost:8080"})
12
 @Repository
11
 @Repository
13
 public interface TransactionRepository extends JpaRepository<Transactions, Long> {
12
 public interface TransactionRepository extends JpaRepository<Transactions, Long> {
13
+
14
+
14
 }
15
 }

+ 9
- 0
src/main/java/com/buecoin01/Repositories/WalletRepository.java View File

2
 
2
 
3
 import com.buecoin01.model.Wallet;
3
 import com.buecoin01.model.Wallet;
4
 import org.springframework.data.jpa.repository.JpaRepository;
4
 import org.springframework.data.jpa.repository.JpaRepository;
5
+import org.springframework.data.jpa.repository.Query;
6
+import org.springframework.data.repository.query.Param;
5
 import org.springframework.stereotype.Repository;
7
 import org.springframework.stereotype.Repository;
6
 import org.springframework.web.bind.annotation.CrossOrigin;
8
 import org.springframework.web.bind.annotation.CrossOrigin;
7
 
9
 
10
+import java.util.List;
11
+
8
 @Repository
12
 @Repository
9
 @CrossOrigin(origins = {"http://localhost:8100","http://localhost:8080"})
13
 @CrossOrigin(origins = {"http://localhost:8100","http://localhost:8080"})
10
 public interface WalletRepository extends JpaRepository<Wallet, Long> {
14
 public interface WalletRepository extends JpaRepository<Wallet, Long> {
15
+
16
+    //@Query(value = "SELECT t FROM Wallet as t WHERE t.publicId = ?1", nativeQuery = true)
17
+    List<Wallet> findWalletByPublicId(@Param("id")String id);
18
+
19
+
11
 }
20
 }

+ 3
- 6
src/main/java/com/buecoin01/controller/BlockController.java View File

9
 
9
 
10
 import java.util.Optional;
10
 import java.util.Optional;
11
 
11
 
12
-public class BlockController { @CrossOrigin(origins = {"http://localhost:8100", "http://localhost:8080"})
13
 @RestController
12
 @RestController
14
-
15
-
16
-public class UserController {
17
-
13
+@CrossOrigin(origins = {"http://localhost:8100", "http://localhost:8080"})
14
+public class BlockController {
18
 
15
 
19
     @Autowired
16
     @Autowired
20
     private BlockRepository blockRepository;
17
     private BlockRepository blockRepository;
53
 
50
 
54
 
51
 
55
 }
52
 }
56
-}
53
+

+ 40
- 22
src/main/java/com/buecoin01/controller/ConductTransactions.java View File

5
 import com.buecoin01.model.Transactions;
5
 import com.buecoin01.model.Transactions;
6
 import com.buecoin01.model.Wallet;
6
 import com.buecoin01.model.Wallet;
7
 import com.buecoin01.utility.Encryption;
7
 import com.buecoin01.utility.Encryption;
8
+import org.slf4j.Logger;
9
+import org.slf4j.LoggerFactory;
8
 import org.springframework.beans.factory.annotation.Autowired;
10
 import org.springframework.beans.factory.annotation.Autowired;
9
-import org.springframework.web.bind.annotation.RestController;
11
+import org.springframework.http.HttpStatus;
12
+import org.springframework.http.ResponseEntity;
13
+import org.springframework.stereotype.Service;
10
 
14
 
11
 import java.time.LocalDateTime;
15
 import java.time.LocalDateTime;
12
 
16
 
13
-@RestController
17
+@Service
14
 public class ConductTransactions {
18
 public class ConductTransactions {
19
+
20
+
15
     @Autowired
21
     @Autowired
16
     private TransactionRepository transactionRepository;
22
     private TransactionRepository transactionRepository;
17
 
23
 
18
     @Autowired
24
     @Autowired
19
     private WalletRepository walletRepository;
25
     private WalletRepository walletRepository;
20
 
26
 
27
+    private static final Logger logger = LoggerFactory.getLogger(ConductTransactions.class);
28
+
29
+
30
+    public ResponseEntity transferMoney( Transactions transaction) {
31
+       Wallet receiver = new Wallet();
32
+
33
+        Wallet sender = new Wallet();
34
+
35
+           if (walletRepository.findWalletByPublicId(transaction.getFromId()).get(0).getAmount() >= transaction.getAmount()) {
36
+
37
+        logger.info("controller is hitting this method");
38
+               sender.setAmount(walletRepository.findWalletByPublicId(transaction.getFromId()).get(0).getAmount() - transaction.getAmount());
39
+               walletRepository.save(sender);
21
 
40
 
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
-    }
41
+               Double amount = walletRepository.findWalletByPublicId(transaction.getToId()).get(0).getAmount();
42
+
43
+               receiver.setAmount(amount + transaction.getAmount());
44
+               walletRepository.save(receiver);
45
+
46
+               Transactions n = new Transactions(Encryption.applySha256(sender.getPublicId() + receiver.getPublicId() + Double.toString(transaction.getAmount()) + LocalDateTime.now()),
47
+                       sender.getPublicId(), receiver.getPublicId(), transaction.getAmount(), LocalDateTime.now());
48
+               logger.info("got here");
49
+
50
+               transactionRepository.save(n);
51
+               logger.info("got here");
52
+
53
+               return new ResponseEntity<>(transaction, HttpStatus.CREATED);
54
+           } else {
55
+               return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
56
+           }
57
+
58
+
59
+}
42
 
60
 
43
 
61
 
44
 
62
 

+ 11
- 7
src/main/java/com/buecoin01/controller/TransactionController.java View File

13
 @RestController
13
 @RestController
14
 public class TransactionController {
14
 public class TransactionController {
15
 
15
 
16
-
17
-
16
+        private ConductTransactions conduct;
17
+        private TransactionRepository transactionRepository;
18
 
18
 
19
         @Autowired
19
         @Autowired
20
-        private TransactionRepository transactionRepository;
20
+        public TransactionController(TransactionRepository transactionRepository, ConductTransactions conductTransactions) {
21
+            this.conduct = conductTransactions;
22
+            this.transactionRepository = transactionRepository;
23
+        }
21
 
24
 
22
         @RequestMapping(value = "/transactions/{id}", method = RequestMethod.GET)
25
         @RequestMapping(value = "/transactions/{id}", method = RequestMethod.GET)
23
         public ResponseEntity get(@PathVariable Long id) {
26
         public ResponseEntity get(@PathVariable Long id) {
33
 
36
 
34
         }
37
         }
35
 
38
 
36
-        @RequestMapping(path = "/addTx", method = RequestMethod.POST)
37
-        public ResponseEntity <?> create(@RequestBody Transactions transactions) {
38
-            transactionRepository.save(transactions);
39
+        @RequestMapping(path = "/checkTx", method = RequestMethod.POST)
40
+        public ResponseEntity <Transactions> create(@RequestBody Transactions transactions) {
41
+            conduct.transferMoney(transactions);
39
             return new ResponseEntity <>(transactions, HttpStatus.CREATED );
42
             return new ResponseEntity <>(transactions, HttpStatus.CREATED );
40
         }
43
         }
41
 
44
 
42
-        @RequestMapping(path = "/deleteTx", method = RequestMethod.DELETE)
45
+        @RequestMapping(path = "/deleteTx/{id}", method = RequestMethod.DELETE)
43
         public ResponseEntity <Transactions> deleteUser(@RequestBody Transactions transactions) {
46
         public ResponseEntity <Transactions> deleteUser(@RequestBody Transactions transactions) {
44
             transactionRepository.delete(transactions);
47
             transactionRepository.delete(transactions);
45
             return new ResponseEntity <>( HttpStatus.OK );
48
             return new ResponseEntity <>( HttpStatus.OK );
52
         }
55
         }
53
 
56
 
54
 
57
 
58
+
55
     }
59
     }
56
 
60
 

+ 3
- 0
src/main/java/com/buecoin01/model/Block.java View File

2
 
2
 
3
 
3
 
4
 import com.buecoin01.utility.Encryption;
4
 import com.buecoin01.utility.Encryption;
5
+import org.springframework.stereotype.Component;
5
 
6
 
6
 import javax.persistence.*;
7
 import javax.persistence.*;
7
 import java.time.LocalDateTime;
8
 import java.time.LocalDateTime;
9
 
10
 
10
 
11
 
11
 @Entity
12
 @Entity
13
+@Component
12
 public class Block {
14
 public class Block {
13
 
15
 
14
     private String minerID;
16
     private String minerID;
34
         this.timeStamp = time;
36
         this.timeStamp = time;
35
         this.previousHash = previousHash;
37
         this.previousHash = previousHash;
36
         this.hash = calculateHash();
38
         this.hash = calculateHash();
39
+        this.nonce = nonce;
37
     }
40
     }
38
 
41
 
39
     public String getHash() {
42
     public String getHash() {

+ 2
- 10
src/main/java/com/buecoin01/model/Transactions.java View File

1
 package com.buecoin01.model;
1
 package com.buecoin01.model;
2
 
2
 
3
-import com.buecoin01.utility.Encryption;
4
-import com.buecoin01.utility.TransactionInput;
5
-import com.buecoin01.utility.TransactionOutput;
6
-import org.springframework.beans.factory.annotation.Autowired;
7
-import org.springframework.context.annotation.Bean;
8
 import org.springframework.stereotype.Component;
3
 import org.springframework.stereotype.Component;
9
 
4
 
10
 import javax.persistence.*;
5
 import javax.persistence.*;
11
-import java.security.PrivateKey;
12
-import java.security.PublicKey;
13
 import java.time.LocalDateTime;
6
 import java.time.LocalDateTime;
14
-import java.util.ArrayList;
15
-import java.util.List;
16
 
7
 
17
 @Component
8
 @Component
18
 @Entity
9
 @Entity
29
     private double amount;
20
     private double amount;
30
     private LocalDateTime timestamp;
21
     private LocalDateTime timestamp;
31
 
22
 
23
+    public Transactions(){}
24
+
32
     public Transactions(String transactionId, String fromId, String toId, double amount, LocalDateTime timestamp) {
25
     public Transactions(String transactionId, String fromId, String toId, double amount, LocalDateTime timestamp) {
33
         this.transactionId = transactionId;
26
         this.transactionId = transactionId;
34
         this.fromId = fromId;
27
         this.fromId = fromId;
85
         this.timestamp = timestamp;
78
         this.timestamp = timestamp;
86
     }
79
     }
87
 
80
 
88
-    public Transactions(){}
89
 
81
 
90
 
82
 
91
 }
83
 }

+ 2
- 7
src/main/java/com/buecoin01/model/Wallet.java View File

1
 package com.buecoin01.model;
1
 package com.buecoin01.model;
2
 
2
 
3
-import com.buecoin01.utility.TransactionInput;
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;
3
 import org.springframework.stereotype.Component;
8
 
4
 
9
 import javax.persistence.*;
5
 import javax.persistence.*;
10
-import java.security.*;
11
 
6
 
12
 
7
 
13
 @Entity
8
 @Entity
14
 @Component
9
 @Component
15
-@Proxy(lazy = false)
10
+//@Proxy(lazy = false)
16
 public class Wallet {
11
 public class Wallet {
17
 
12
 
18
     @Id
13
     @Id
19
     @Column(name = "id")
14
     @Column(name = "id")
20
     @GeneratedValue(strategy = GenerationType.IDENTITY)
15
     @GeneratedValue(strategy = GenerationType.IDENTITY)
21
     private long id;
16
     private long id;
22
-    @Column(name = "pubicId")
17
+    @Column(name = "pubicId", unique = true)
23
     private String publicId;
18
     private String publicId;
24
     @Column(name = "amount")
19
     @Column(name = "amount")
25
     private double amount;
20
     private double amount;

+ 1
- 2
src/main/resources/application.properties View File

7
 spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
7
 spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
8
 spring.datasource.testWhileIdle = true
8
 spring.datasource.testWhileIdle = true
9
 spring.datasource.validationQuery = SELECT 1
9
 spring.datasource.validationQuery = SELECT 1
10
-
11
-
10
+#spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy

+ 1
- 2
target/classes/application.properties View File

7
 spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
7
 spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
8
 spring.datasource.testWhileIdle = true
8
 spring.datasource.testWhileIdle = true
9
 spring.datasource.validationQuery = SELECT 1
9
 spring.datasource.validationQuery = SELECT 1
10
-
11
-
10
+#spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy

BIN
target/classes/com/buecoin01/ProcessLoader.class View File


BIN
target/classes/com/buecoin01/Repositories/WalletRepository.class View File


BIN
target/classes/com/buecoin01/controller/BlockController$UserController.class View File


BIN
target/classes/com/buecoin01/controller/BlockController.class View File


BIN
target/classes/com/buecoin01/controller/ConductTransactions.class View File


BIN
target/classes/com/buecoin01/controller/TransactionController.class View File


BIN
target/classes/com/buecoin01/model/Block.class View File


BIN
target/classes/com/buecoin01/model/Transactions.class View File


BIN
target/classes/com/buecoin01/model/Wallet.class View File