Browse Source

updated blockservice mined block by id method

Eric Foster 6 years ago
parent
commit
f127226666

+ 39
- 44
ZipCoinRedJavaServer/.idea/workspace.xml View File

@@ -45,10 +45,10 @@
45 45
           </provider>
46 46
         </entry>
47 47
       </file>
48
-      <file leaf-file-name="BlockService.java" pinned="false" current-in-tab="true">
48
+      <file leaf-file-name="BlockService.java" pinned="false" current-in-tab="false">
49 49
         <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/service/BlockService.java">
50 50
           <provider selected="true" editor-type-id="text-editor">
51
-            <state relative-caret-position="327">
51
+            <state relative-caret-position="438">
52 52
               <caret line="31" column="38" selection-start-line="31" selection-start-column="38" selection-end-line="31" selection-end-column="38" />
53 53
               <folding>
54 54
                 <element signature="imports" expanded="true" />
@@ -75,6 +75,24 @@
75 75
           </provider>
76 76
         </entry>
77 77
       </file>
78
+      <file leaf-file-name=".gitignore" pinned="false" current-in-tab="false">
79
+        <entry file="file://$PROJECT_DIR$/.gitignore">
80
+          <provider selected="true" editor-type-id="text-editor">
81
+            <state relative-caret-position="30">
82
+              <caret line="2" column="6" lean-forward="true" selection-start-line="2" selection-start-column="6" selection-end-line="2" selection-end-column="6" />
83
+            </state>
84
+          </provider>
85
+        </entry>
86
+      </file>
87
+      <file leaf-file-name="pom.xml" pinned="false" current-in-tab="true">
88
+        <entry file="file://$PROJECT_DIR$/pom.xml">
89
+          <provider selected="true" editor-type-id="text-editor">
90
+            <state relative-caret-position="195">
91
+              <caret line="13" column="30" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="30" />
92
+            </state>
93
+          </provider>
94
+        </entry>
95
+      </file>
78 96
     </leaf>
79 97
   </component>
80 98
   <component name="FileTemplateManagerImpl">
@@ -143,9 +161,8 @@
143 161
     <packageJsonPaths />
144 162
   </component>
145 163
   <component name="ProjectFrameBounds" fullScreen="true">
146
-    <option name="y" value="23" />
147 164
     <option name="width" value="1280" />
148
-    <option name="height" value="720" />
165
+    <option name="height" value="800" />
149 166
   </component>
150 167
   <component name="ProjectView">
151 168
     <navigator proportions="" version="1">
@@ -185,33 +202,6 @@
185 202
               <item name="java" type="462c0819:PsiDirectoryNode" />
186 203
               <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
187 204
             </path>
188
-            <path>
189
-              <item name="ZipCoin-RED" type="b2602c69:ProjectViewProjectNode" />
190
-              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
191
-              <item name="src" type="462c0819:PsiDirectoryNode" />
192
-              <item name="main" type="462c0819:PsiDirectoryNode" />
193
-              <item name="java" type="462c0819:PsiDirectoryNode" />
194
-              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
195
-              <item name="controller" type="462c0819:PsiDirectoryNode" />
196
-            </path>
197
-            <path>
198
-              <item name="ZipCoin-RED" type="b2602c69:ProjectViewProjectNode" />
199
-              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
200
-              <item name="src" type="462c0819:PsiDirectoryNode" />
201
-              <item name="main" type="462c0819:PsiDirectoryNode" />
202
-              <item name="java" type="462c0819:PsiDirectoryNode" />
203
-              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
204
-              <item name="repository" type="462c0819:PsiDirectoryNode" />
205
-            </path>
206
-            <path>
207
-              <item name="ZipCoin-RED" type="b2602c69:ProjectViewProjectNode" />
208
-              <item name="ZipCoinRedJavaServer" type="462c0819:PsiDirectoryNode" />
209
-              <item name="src" type="462c0819:PsiDirectoryNode" />
210
-              <item name="main" type="462c0819:PsiDirectoryNode" />
211
-              <item name="java" type="462c0819:PsiDirectoryNode" />
212
-              <item name="zipcoin" type="462c0819:PsiDirectoryNode" />
213
-              <item name="service" type="462c0819:PsiDirectoryNode" />
214
-            </path>
215 205
           </expand>
216 206
           <select />
217 207
         </subPane>
@@ -323,7 +313,7 @@
323 313
     <servers />
324 314
   </component>
325 315
   <component name="TimeTrackingManager">
326
-    <option name="totallyTimeSpent" value="15316000" />
316
+    <option name="totallyTimeSpent" value="16209000" />
327 317
   </component>
328 318
   <component name="TodoView">
329 319
     <todo-panel id="selected-file">
@@ -336,7 +326,6 @@
336 326
   </component>
337 327
   <component name="ToolWindowManager">
338 328
     <frame x="0" y="0" width="1280" height="800" extended-state="0" />
339
-    <editor active="true" />
340 329
     <layout>
341 330
       <window_info anchor="right" id="Palette" />
342 331
       <window_info anchor="bottom" id="Event Log" side_tool="true" />
@@ -355,10 +344,10 @@
355 344
       <window_info id="Image Layers" />
356 345
       <window_info anchor="bottom" id="Java Enterprise" />
357 346
       <window_info anchor="right" id="Capture Analysis" />
358
-      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.15310344" />
347
+      <window_info anchor="bottom" id="Run" order="2" weight="0.64689654" />
359 348
       <window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
360 349
       <window_info anchor="bottom" id="Spring" />
361
-      <window_info anchor="bottom" id="Terminal" weight="0.32905295" />
350
+      <window_info anchor="bottom" id="Terminal" visible="true" weight="0.32827586" />
362 351
       <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24959612" />
363 352
       <window_info anchor="right" id="Bean Validation" />
364 353
       <window_info id="Web" side_tool="true" />
@@ -406,7 +395,6 @@
406 395
     <option name="myLimit" value="2678400000" />
407 396
   </component>
408 397
   <component name="editorHistoryManager">
409
-    <entry file="file://$PROJECT_DIR$/ZipCoin-RED.iml" />
410 398
     <entry file="file://$PROJECT_DIR$/src/test/java/com/zipcoin/redCoin/block/test/BlockControllerTest.java">
411 399
       <provider selected="true" editor-type-id="text-editor">
412 400
         <state relative-caret-position="30">
@@ -493,13 +481,6 @@
493 481
         </state>
494 482
       </provider>
495 483
     </entry>
496
-    <entry file="file://$PROJECT_DIR$/pom.xml">
497
-      <provider selected="true" editor-type-id="text-editor">
498
-        <state relative-caret-position="245">
499
-          <caret line="52" column="21" selection-start-line="52" selection-start-column="21" selection-end-line="52" selection-end-column="21" />
500
-        </state>
501
-      </provider>
502
-    </entry>
503 484
     <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/model/Wallet.java">
504 485
       <provider selected="true" editor-type-id="text-editor">
505 486
         <state relative-caret-position="345">
@@ -641,7 +622,7 @@
641 622
     </entry>
642 623
     <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcoin/service/BlockService.java">
643 624
       <provider selected="true" editor-type-id="text-editor">
644
-        <state relative-caret-position="327">
625
+        <state relative-caret-position="438">
645 626
           <caret line="31" column="38" selection-start-line="31" selection-start-column="38" selection-end-line="31" selection-end-column="38" />
646 627
           <folding>
647 628
             <element signature="imports" expanded="true" />
@@ -649,5 +630,19 @@
649 630
         </state>
650 631
       </provider>
651 632
     </entry>
633
+    <entry file="file://$PROJECT_DIR$/.gitignore">
634
+      <provider selected="true" editor-type-id="text-editor">
635
+        <state relative-caret-position="30">
636
+          <caret line="2" column="6" lean-forward="true" selection-start-line="2" selection-start-column="6" selection-end-line="2" selection-end-column="6" />
637
+        </state>
638
+      </provider>
639
+    </entry>
640
+    <entry file="file://$PROJECT_DIR$/pom.xml">
641
+      <provider selected="true" editor-type-id="text-editor">
642
+        <state relative-caret-position="195">
643
+          <caret line="13" column="30" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="30" />
644
+        </state>
645
+      </provider>
646
+    </entry>
652 647
   </component>
653 648
 </project>

+ 1
- 1
ZipCoinRedJavaServer/src/main/java/com/zipcoin/service/BlockService.java View File

@@ -32,7 +32,7 @@ public class BlockService {
32 32
         if (blockToMine.isPresent()) {
33 33
             Miner miner = new Miner();
34 34
             Block minedBlock = miner.mine(blockToMine.get());
35
-            return blockRepository.saveAndFlush(minedBlock);
35
+            return blockRepository.save(minedBlock);
36 36
         } else {
37 37
             return null;
38 38
         }