Skip to content
Snippets Groups Projects
Commit 322316d3 authored by inso's avatar inso
Browse files

Fixed a bug when caching merkle trees

Fixed a bug when an inputs would be removed from available ones even if the transaction is refused
Added icons
Display community nodes again
Save community nodes and load them when acccessing a community object
parent 099a63d4
Branches
Tags
No related merge requests found
Showing
with 692 additions and 45 deletions
Icons are from the Noun Project.
noun_2651_cc.svg : Created by Sergey Bakin
noun_18704_cc.svg : Created by Ian Mawle
noun_22441_cc.svg : Created by Bruno Castro
noun_29542_cc.svg : Created by Chris Kerr
noun_43022_cc.svg : Created by Jon Prepeluh
noun_63271_cc.svg : Created by Mark Shorter
\ No newline at end of file
<RCC>
<qresource prefix="icons">
<file alias="community_icon">noun_22441_cc.svg</file>
<file alias="wot_icon">noun_2651_cc.svg</file>
<file alias="members_icon">noun_18704_cc.svg</file>
<file alias="wallet_icon">noun_29542_cc.svg</file>
<file alias="tx_icon">noun_63271_cc.svg</file>
<file alias="currency_icon">noun_43022_cc.svg</file>
</qresource>
</RCC>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="5.0 -10.0 100.0 135.0"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.5 r10040"
sodipodi:docname="noun_18704_cc.svg"><metadata
id="metadata31"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs29" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview27"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="50"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><g
id="g3"
transform="matrix(1.5988728,0,0,1.5988728,-25.131921,-21.494665)"><g
id="g5"><path
d="m 58.065,32.624 h -16.13 c -2.584,0 -4.684,2.093 -4.684,4.68 v 21.95 c 0,2.585 2.1,4.682 4.684,4.682 h 0.024 v 15.551 c 0,2.586 2.034,4.682 4.554,4.682 h 6.975 c 2.515,0 4.555,-2.095 4.555,-4.682 V 63.936 h 0.023 c 2.586,0 4.685,-2.095 4.685,-4.682 v -21.95 c -0.004,-2.587 -2.1,-4.68 -4.686,-4.68 z"
id="path7"
inkscape:connector-curvature="0"
style="fill:#000000" /><circle
cx="50"
cy="23.473"
r="7.6399999"
id="circle9"
d="m 57.64,23.473 c 0,4.219455 -3.420545,7.639999 -7.64,7.639999 -4.219455,0 -7.64,-3.420544 -7.64,-7.639999 0,-4.219456 3.420545,-7.64 7.64,-7.64 4.219455,0 7.64,3.420544 7.64,7.64 z"
sodipodi:cx="50"
sodipodi:cy="23.473"
sodipodi:rx="7.6399999"
sodipodi:ry="7.6399999"
style="fill:#000000" /></g><g
id="g11"><path
d="m 85.989,34.448 h -13.82 c -2.221,0 -4.016,1.797 -4.016,4.012 v 18.812 c 0,2.218 1.795,4.012 4.016,4.012 h 0.021 v 13.324 c 0,2.216 1.744,4.01 3.896,4.01 h 5.981 c 2.154,0 3.897,-1.794 3.897,-4.01 V 61.283 h 0.021 c 2.218,0 4.014,-1.797 4.014,-4.014 V 38.458 c 0.002,-2.213 -1.794,-4.01 -4.01,-4.01 z"
id="path13"
inkscape:connector-curvature="0"
style="fill:#000000" /><path
d="m 79.08,20.062 c 3.612,0 6.546,2.931 6.546,6.545 0,3.617 -2.934,6.549 -6.546,6.549 -3.617,0 -6.548,-2.932 -6.548,-6.549 0,-3.614 2.931,-6.545 6.548,-6.545 z"
id="path15"
inkscape:connector-curvature="0"
style="fill:#000000" /></g><g
id="g17"><path
d="m 27.833,34.448 h -13.82 c -2.217,0 -4.012,1.797 -4.012,4.01 V 57.27 c 0,2.217 1.795,4.014 4.012,4.014 h 0.021 v 13.322 c 0,2.218 1.746,4.012 3.9,4.012 h 5.979 c 2.152,0 3.896,-1.794 3.896,-4.012 V 61.283 h 0.021 c 2.216,0 4.012,-1.797 4.012,-4.014 V 38.458 c 0,-2.213 -1.793,-4.01 -4.009,-4.01 z"
id="path19"
inkscape:connector-curvature="0"
style="fill:#000000" /><circle
cx="20.922001"
cy="26.608999"
r="6.546"
id="circle21"
d="m 27.468001,26.608999 c 0,3.615256 -2.930744,6.546 -6.546,6.546 -3.615256,0 -6.546,-2.930744 -6.546,-6.546 0,-3.615256 2.930744,-6.546 6.546,-6.546 3.615256,0 6.546,2.930744 6.546,6.546 z"
sodipodi:cx="20.922001"
sodipodi:cy="26.608999"
sodipodi:rx="6.546"
sodipodi:ry="6.546"
style="fill:#000000" /></g></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.0"
id="Layer_1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="5.0 -10.0 100.0 135.0"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.5 r10040"
sodipodi:docname="noun_22441_cc.svg"><metadata
id="metadata190"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs188" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview186"
showgrid="false"
inkscape:zoom="1.668772"
inkscape:cx="56.66954"
inkscape:cy="70.869906"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><g
id="g102"
transform="matrix(1.3395831,0,0,1.3395831,-12.529946,-9.2940339)"><g
id="g104"><path
d="M 49.946,17.395"
id="path106"
inkscape:connector-curvature="0" /><path
d="m 49.944,6.356 c -1.424,0 -2.576,-1.147 -2.576,-2.574 -0.001,-1.42 1.152,-2.578 2.576,-2.578 1.424,0 2.577,1.158 2.577,2.578 0,1.427 -1.153,2.574 -2.577,2.574 z"
id="path108"
inkscape:connector-curvature="0" /><polygon
points="58.23,1.164 52.212,7.39 50.004,7.39 49.998,7.39 47.791,7.39 41.771,1.164 40.751,1.602 47.114,11.026 47.067,17.411 45.201,32.946 46.95,32.946 50.001,20.032 53.053,32.946 54.801,32.946 52.935,17.411 52.887,11.026 59.251,1.602 "
id="polygon110" /></g></g><g
id="g112"
transform="matrix(1.3395831,0,0,1.3395831,-12.529946,-9.2940339)"><g
id="g114"><path
d="M 50.058,82.604"
id="path116"
inkscape:connector-curvature="0" /><path
d="m 50.058,93.644 c 1.421,0 2.576,1.147 2.576,2.573 0,1.42 -1.153,2.58 -2.576,2.58 -1.427,0 -2.579,-1.16 -2.579,-2.58 0,-1.426 1.152,-2.573 2.579,-2.573 z"
id="path118"
inkscape:connector-curvature="0" /><polygon
points="41.771,98.837 47.791,92.61 49.998,92.61 50.004,92.61 52.212,92.61 58.23,98.837 59.251,98.396 52.887,88.973 52.935,82.588 54.801,67.053 53.053,67.053 50.001,79.969 46.95,67.053 45.201,67.053 47.067,82.588 47.114,88.973 40.751,98.396 "
id="polygon120" /></g></g><g
id="g122"
transform="matrix(1.3395831,0,0,1.3395831,-12.529946,-9.2940339)"><g
id="g124"><path
d="M 26.906,26.984"
id="path126"
inkscape:connector-curvature="0" /><path
d="m 19.101,19.181 c -1.006,1.005 -2.634,1.009 -3.643,0 -1.005,-1.004 -1.008,-2.638 -0.002,-3.645 1.009,-1.009 2.644,-1.005 3.647,0 1.008,1.009 1.005,2.636 -0.002,3.645 z"
id="path128"
inkscape:connector-curvature="0" /><polygon
points="21.287,9.648 21.433,18.307 19.872,19.868 19.868,19.871 18.308,21.432 9.649,21.286 9.236,22.317 20.4,24.482 24.883,29.031 34.548,41.337 35.784,40.1 28.811,28.809 40.1,35.783 41.337,34.547 29.032,24.882 24.483,20.399 22.318,9.236 "
id="polygon130" /></g></g><g
id="g132"
transform="matrix(1.3395831,0,0,1.3395831,-12.529946,-9.2940339)"><g
id="g134"><path
d="M 73.095,73.017"
id="path136"
inkscape:connector-curvature="0" /><path
d="m 80.898,80.819 c 1.008,-1.005 2.636,-1.01 3.645,-0.002 1.005,1.006 1.007,2.641 0.002,3.647 -1.009,1.006 -2.643,1.003 -3.648,-0.002 -1.009,-1.006 -1.005,-2.634 10e-4,-3.643 z"
id="path138"
inkscape:connector-curvature="0" /><polygon
points="78.715,90.352 78.568,81.693 80.128,80.133 80.132,80.129 81.693,78.567 90.354,78.714 90.762,77.683 79.6,75.518 75.116,70.968 65.452,58.665 64.215,59.901 71.19,71.189 59.9,64.216 58.665,65.453 70.968,75.117 75.517,79.6 77.682,90.763 "
id="polygon140" /></g></g><g
id="g142"
transform="matrix(1.3395831,0,0,1.3395831,-12.529946,-9.2940339)"><g
id="g144"><path
d="M 17.395,50.056"
id="path146"
inkscape:connector-curvature="0" /><path
d="m 6.357,50.058 c 0,1.422 -1.148,2.575 -2.574,2.575 -1.421,10e-4 -2.579,-1.153 -2.578,-2.575 0,-1.427 1.157,-2.58 2.578,-2.58 1.426,0 2.574,1.153 2.574,2.58 z"
id="path148"
inkscape:connector-curvature="0" /><polygon
points="1.164,41.771 7.39,47.789 7.39,49.998 7.39,50.003 7.39,52.21 1.164,58.229 1.603,59.249 11.026,52.888 17.411,52.934 32.947,54.8 32.947,53.05 20.032,49.999 32.947,46.949 32.947,45.201 17.412,47.066 11.026,47.113 1.603,40.75 "
id="polygon150" /></g></g><g
id="g152"
transform="matrix(1.3395831,0,0,1.3395831,-12.529946,-9.2940339)"><g
id="g154"><path
d="M 82.604,49.945"
id="path156"
inkscape:connector-curvature="0" /><path
d="m 93.641,49.943 c 0.002,-1.423 1.149,-2.577 2.575,-2.576 1.421,-10e-4 2.581,1.152 2.581,2.576 0,1.425 -1.16,2.578 -2.581,2.578 -1.426,0 -2.573,-1.153 -2.575,-2.578 z"
id="path158"
inkscape:connector-curvature="0" /><polygon
points="98.837,58.229 92.611,52.21 92.611,50.003 92.611,49.998 92.611,47.79 98.837,41.771 98.398,40.75 88.974,47.113 82.587,47.066 67.052,45.201 67.052,46.949 79.968,49.999 67.052,53.05 67.052,54.8 82.587,52.934 88.974,52.888 98.398,59.249 "
id="polygon160" /></g></g><g
id="g162"
transform="matrix(1.3395831,0,0,1.3395831,-12.529946,-9.2940339)"><g
id="g164"><path
d="M 26.984,73.096"
id="path166"
inkscape:connector-curvature="0" /><path
d="m 19.181,80.899 c 1.005,1.007 1.01,2.636 10e-4,3.644 -1.004,1.004 -2.639,1.008 -3.646,10e-4 -1.008,-1.008 -1.005,-2.642 0,-3.647 1.009,-1.009 2.636,-1.004 3.645,0.002 z"
id="path168"
inkscape:connector-curvature="0" /><polygon
points="9.649,78.714 18.307,78.567 19.868,80.129 19.872,80.133 21.432,81.692 21.287,90.352 22.318,90.763 24.482,79.6 29.031,75.117 41.337,65.453 40.1,64.216 28.809,71.191 35.784,59.901 34.548,58.665 24.882,70.968 20.399,75.518 9.236,77.683 "
id="polygon170" /></g></g><g
id="g172"
transform="matrix(1.3395831,0,0,1.3395831,-12.529946,-9.2940339)"><g
id="g174"><path
d="M 73.017,26.905"
id="path176"
inkscape:connector-curvature="0" /><path
d="m 80.818,19.1 c -1.005,-1.005 -1.009,-2.634 0,-3.642 1.004,-1.006 2.64,-1.009 3.646,-0.002 1.007,1.009 1.003,2.644 0,3.647 -1.008,1.008 -2.636,1.004 -3.646,-0.003 z"
id="path178"
inkscape:connector-curvature="0" /><polygon
points="90.352,21.286 81.693,21.433 80.132,19.871 80.128,19.868 78.568,18.307 78.715,9.648 77.682,9.236 75.517,20.399 70.968,24.883 58.665,34.548 59.9,35.783 71.19,28.811 64.215,40.1 65.452,41.337 75.116,29.031 79.6,24.482 90.762,22.318 "
id="polygon180" /></g></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="5.0 -10.0 100.0 135.0"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.5 r10040"
sodipodi:docname="noun_2651_cc.svg"><metadata
id="metadata35"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs33" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview31"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="50"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><g
id="g3"
transform="matrix(1.4516546,0,0,1.4516546,-17.434427,-11.678461)"><g
id="g5"><path
d="m 19.3,48.049 c -6.816,0 -12.362,-5.546 -12.362,-12.362 0,-6.817 5.546,-12.363 12.362,-12.363 6.816,0 12.362,5.546 12.362,12.363 0,6.816 -5.546,12.362 -12.362,12.362 z m 0,-19.725 c -4.06,0 -7.362,3.303 -7.362,7.363 0,4.06 3.303,7.362 7.362,7.362 4.059,0 7.362,-3.303 7.362,-7.362 0,-4.061 -3.303,-7.363 -7.362,-7.363 z"
id="path7"
inkscape:connector-curvature="0"
style="fill:#000000" /></g><g
id="g9"><path
d="m 50,48.049 c -6.816,0 -12.362,-5.546 -12.362,-12.362 0,-6.817 5.546,-12.363 12.362,-12.363 6.816,0 12.362,5.546 12.362,12.363 0,6.816 -5.546,12.362 -12.362,12.362 z m 0,-19.725 c -4.06,0 -7.362,3.303 -7.362,7.363 0,4.06 3.303,7.362 7.362,7.362 4.059,0 7.362,-3.303 7.362,-7.362 0,-4.061 -3.302,-7.363 -7.362,-7.363 z"
id="path11"
inkscape:connector-curvature="0"
style="fill:#000000" /></g><g
id="g13"><path
d="m 50,78.676 c -6.816,0 -12.362,-5.545 -12.362,-12.363 0,-6.816 5.546,-12.361 12.362,-12.361 6.816,0 12.362,5.545 12.362,12.361 0,6.818 -5.546,12.363 -12.362,12.363 z m 0,-19.725 c -4.06,0 -7.362,3.303 -7.362,7.361 0,4.061 3.303,7.363 7.362,7.363 4.059,0 7.362,-3.303 7.362,-7.363 0,-4.058 -3.302,-7.361 -7.362,-7.361 z"
id="path15"
inkscape:connector-curvature="0"
style="fill:#000000" /></g><g
id="g17"><path
d="m 80.7,48.049 c -6.816,0 -12.362,-5.546 -12.362,-12.362 0,-6.817 5.546,-12.363 12.362,-12.363 6.816,0 12.362,5.546 12.362,12.363 0.001,6.816 -5.545,12.362 -12.362,12.362 z m 0,-19.725 c -4.06,0 -7.362,3.303 -7.362,7.363 0,4.06 3.303,7.362 7.362,7.362 4.059,0 7.362,-3.303 7.362,-7.362 0.001,-4.061 -3.302,-7.363 -7.362,-7.363 z"
id="path19"
inkscape:connector-curvature="0"
style="fill:#000000" /></g><path
d="m 78.2,45.807 v 8.645 c 0,5.238 -4.262,9.5 -9.5,9.5 h -9.283 v 5 H 68.7 c 7.995,0 14.5,-6.506 14.5,-14.5 v -8.645 h -5 z"
id="path21"
inkscape:connector-curvature="0"
style="fill:#000000" /><path
d="M 41.543,63.951 H 31.171 c -5.238,0 -9.5,-4.262 -9.5,-9.5 v -8.645 h -5 v 8.645 c 0,7.994 6.505,14.5 14.5,14.5 h 10.372 v -5 z"
id="path23"
inkscape:connector-curvature="0"
style="fill:#000000" /><rect
x="47.5"
y="44.512001"
width="5"
height="11.658"
id="rect25"
style="fill:#000000" /></g></svg>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="5.0 -10.0 100.0 135.0"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.5 r10040"
sodipodi:docname="noun_29542_cc.svg"><metadata
id="metadata23"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs21" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview19"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="42.264259"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><path
d="m 110.19137,37.058657 h -6.41627 l -6.916674,4.850558 h 11.279734 c 0.53481,0 1.06389,0.06739 1.56715,0.189262 3.09988,0.722636 5.40543,3.52859 5.40543,6.87222 V 110.7576 c 2.94074,-1.72486 4.92799,-4.94088 4.92799,-8.6315 V 47.039365 c -0.001,-5.515843 -4.41181,-9.980708 -9.84736,-9.980708 z"
id="path3"
inkscape:connector-curvature="0" /><path
d="M 108.41345,46.058643 H -1.4703948 c -1.1484767,0 -2.0732801,-0.93054 -2.0732801,-2.07328 0,-1.148478 0.9262372,-2.081883 2.0732801,-2.081883 H 6.9933481 L 9.7993019,39.876081 13.699247,37.058657 H -0.22872085 c -5.49003415,0 -9.93912615,4.464865 -9.93912615,9.967803 v 1.937068 63.904632 c 0,5.5101 4.449092,9.97353 9.93912615,9.97353 H 101.37204 c 5.48716,0 9.94056,-4.46343 9.94056,-9.97353 V 48.963528 c -0.007,-1.604426 -1.30476,-2.904885 -2.89915,-2.904885 z"
id="path5"
inkscape:connector-curvature="0" /><g
id="g7"
transform="matrix(1.4338036,0,0,1.4338036,-16.093758,-12.27996)"><path
d="m 49.752,26.299 c -5.534,-0.29 -10.249,3.943 -10.524,9.453 -0.036,0.745 0.016,1.472 0.137,2.177 h 19.797 c 0.062,-0.368 0.106,-0.741 0.126,-1.122 0.273,-5.515 -3.998,-10.219 -9.536,-10.508 z"
id="path9"
inkscape:connector-curvature="0"
style="fill:none" /><path
d="m 39.228,35.752 c 0.275,-5.509 4.991,-9.742 10.524,-9.453 5.538,0.289 9.808,4.992 9.536,10.507 -0.02,0.381 -0.064,0.754 -0.126,1.122 H 74.739 L 84.561,30.636 64.814,4.572 19.895,37.929 h 19.47 c -0.121,-0.705 -0.173,-1.432 -0.137,-2.177 z"
id="path11"
inkscape:connector-curvature="0" /></g><polygon
points="40.884,5.019 22.209,33.399 51.353,11.92 "
id="polygon13"
transform="matrix(1.4338036,0,0,1.4338036,-16.093758,-12.27996)" /></svg>
\ No newline at end of file
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="5.0 -10.0 100.0 135.0"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.5 r10040"
sodipodi:docname="noun_63271_cc.svg"><metadata
id="metadata23"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs21" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview19"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="55.66586"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1" /><g
id="g3"
transform="matrix(1.4845545,0,0,1.4845545,-19.011756,-20.223488)"><polygon
points="95,40.361 71.584,16.947 59.878,16.945 83.293,40.361 59.876,63.777 71.584,63.777 94.998,40.361 "
id="polygon5" /><polygon
points="83.293,40.361 83.293,44.501 41.901,44.5 41.899,44.502 50.178,36.224 83.293,36.224 "
id="polygon7" /></g><g
id="g9"
transform="matrix(1.4845545,0,0,1.4845545,-19.011756,-20.223488)"><polygon
points="5,59.639 28.416,83.053 40.123,83.055 16.709,59.639 40.125,36.224 28.416,36.224 5.002,59.639 "
id="polygon11" /><polygon
points="16.707,59.639 16.707,55.498 58.099,55.5 58.101,55.498 49.822,63.777 16.707,63.777 "
id="polygon13" /></g></svg>
\ No newline at end of file
......@@ -23,6 +23,10 @@
<number>0</number>
</property>
<widget class="QWidget" name="tab_members">
<attribute name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/members_icon</normaloff>:/icons/members_icon</iconset>
</attribute>
<attribute name="title">
<string>Members</string>
</attribute>
......@@ -68,7 +72,9 @@
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../icons/icons.qrc"/>
</resources>
<connections>
<connection>
<sender>button_membership</sender>
......
......@@ -13,6 +13,10 @@
<property name="windowTitle">
<string>Form</string>
</property>
<property name="windowIcon">
<iconset>
<normaloff>:/icons/noun_43022_cc.svg</normaloff>:/icons/noun_43022_cc.svg</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QFrame" name="actionsFrame">
......@@ -32,6 +36,10 @@
<number>0</number>
</property>
<widget class="QWidget" name="tab_wallets">
<attribute name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/wallet_icon</normaloff>:/icons/wallet_icon</iconset>
</attribute>
<attribute name="title">
<string>Wallets</string>
</attribute>
......@@ -49,6 +57,10 @@
</layout>
</widget>
<widget class="QWidget" name="tab_transactions">
<attribute name="icon">
<iconset resource="../icons/icons.qrc">
<normaloff>:/icons/tx_icon</normaloff>:/icons/tx_icon</iconset>
</attribute>
<attribute name="title">
<string>Transactions</string>
</attribute>
......@@ -90,7 +102,9 @@
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../icons/icons.qrc"/>
</resources>
<connections>
<connection>
<sender>list_wallets</sender>
......
......@@ -10,6 +10,7 @@ from ucoinpy.documents.peer import Peer, Endpoint, BMAEndpoint
from ucoinpy.documents.block import Block
import logging
import time
import inspect
class Community(object):
......@@ -22,9 +23,16 @@ class Community(object):
'''
self.currency = currency
self.peers = peers
self.requests_cache = None
self.requests_cache = {}
self.last_block = None
# After initializing the community from latest peers,
# we refresh its peers tree
found_peers = self.peering()
for p in found_peers:
if p.pubkey not in [peer.pubkey for peer in peers]:
self.peers.append(p)
@classmethod
def create(cls, currency, peer):
return cls(currency, [peer])
......@@ -46,7 +54,6 @@ class Community(object):
peers.append(peer)
community = cls(currency, peers)
return community
def name(self):
......@@ -62,17 +69,14 @@ class Community(object):
req_args={'number': block_number})
return block['dividend']
def send_membership(self, account, membership):
pass
def peering(self):
peers = []
peering_data = self.request(bma.network.peering.Peers)
logging.debug(peering_data)
logging.debug("Peering : {0}".format(peering_data))
for peer in peering_data:
logging.debug(peer)
#peers.append(Peer.from_signed_raw("{0}{1}\n".format(peer['value']['raw'],
# peer['value']['signature'])))
peers.append(Peer.from_signed_raw("{0}{1}\n".format(peer['value']['raw'],
peer['value']['signature'])))
return peers
def get_block(self, number=None):
......@@ -109,7 +113,7 @@ class Community(object):
block = bma.blockchain.Current(e.conn_handler()).get()
self.last_block = {"request_ts": time.time(),
"number": block['number']}
self.requests_cache = None
self.requests_cache = {}
cache_key = (hash(request),
hash(tuple(frozenset(sorted(req_args.keys())))),
......@@ -117,24 +121,20 @@ class Community(object):
hash(tuple(frozenset(sorted(get_args.keys())))),
hash(tuple(frozenset(sorted(get_args.items())))))
# If the cache was cleared, let's initialize a new one
if self.requests_cache is None:
req = request(e.conn_handler(), **req_args)
data = req.get(**get_args)
self.requests_cache = {cache_key: data}
else:
if cache_key in self.requests_cache.keys():
#logging.debug("Cache : {0} : {1}".format(cache_key,
# self.requests_cache[cache_key]))
return self.requests_cache[cache_key]
# If we cant find it, we request for it
else:
if cache_key not in self.requests_cache.keys():
logging.debug("Connecting to {0}:{1}".format(e.server,
e.port))
req = request(e.conn_handler(), **req_args)
data = req.get(**get_args)
if inspect.isgenerator(data):
cached_data = []
for d in data:
cached_data.append(d)
self.requests_cache[cache_key] = cached_data
logging.debug("Got a generator !")
else:
self.requests_cache[cache_key] = data
return data
return self.requests_cache[cache_key]
def post(self, request, req_args={}, post_args={}):
for peer in self.peers:
......
......@@ -182,8 +182,15 @@ class Wallet(object):
tx.sign([key])
logging.debug("Transaction : {0}".format(tx.signed_raw()))
try:
community.post(bma.tx.Process,
post_args={'transaction': tx.signed_raw()})
except:
# If it fails, do not remove inputs from available inputs
# And raise the exception again
for i in inputs:
self.available_inputs[1].append(i)
raise
def sources(self, community):
data = community.request(bma.tx.Sources,
......
......@@ -6,6 +6,7 @@ Created on 2 févr. 2014
import logging
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QWidget, QMessageBox, QAction, QMenu, QInputDialog, QLineEdit
from ..models.members import MembersListModel
from ..gen_resources.community_tab_uic import Ui_CommunityTabWidget
......@@ -38,7 +39,9 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget):
self.button_membership.setText("Send membership demand")
self.button_membership.clicked.connect(self.send_membership_demand)
self.tabs_information.addTab(WotTabWidget(account, community), "Wot")
self.tabs_information.addTab(WotTabWidget(account, community),
QIcon(':/icons/wot_icon'),
"Wot")
def member_context_menu(self, point):
index = self.list_community_members.indexAt(point)
......
......@@ -7,6 +7,7 @@ Created on 2 févr. 2014
import logging
from PyQt5.QtWidgets import QWidget, QMenu, QAction, QApplication
from PyQt5.QtCore import QModelIndex, Qt
from PyQt5.QtGui import QIcon
from cutecoin.gen_resources.currency_tab_uic import Ui_CurrencyTabWidget
from cutecoin.gui.community_tab import CommunityTabWidget
from cutecoin.models.sent import SentListModel
......@@ -43,7 +44,9 @@ class CurrencyTabWidget(QWidget, Ui_CurrencyTabWidget):
ReceivedListModel(self.app.current_account, self.community))
tab_community = CommunityTabWidget(self.app.current_account,
self.community)
self.tabs_account.addTab(tab_community, "Community")
self.tabs_account.addTab(tab_community,
QIcon(':/icons/community_icon'),
"Community")
def refresh_wallets(self):
wallets_list_model = WalletsListModel(self.app.current_account,
......
......@@ -6,6 +6,7 @@ Created on 1 févr. 2014
from cutecoin.gen_resources.mainwindow_uic import Ui_MainWindow
from PyQt5.QtWidgets import QMainWindow, QAction, QFileDialog
from PyQt5.QtCore import QSignalMapper
from PyQt5.QtGui import QIcon
from cutecoin.gui.process_cfg_account import ProcessConfigureAccount
from cutecoin.gui.transfer import TransferMoneyDialog
from cutecoin.gui.currency_tab import CurrencyTabWidget
......@@ -93,7 +94,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
for community in self.app.current_account.communities:
tab_currency = CurrencyTabWidget(self.app, community)
tab_currency.refresh()
self.currencies_tabwidget.addTab(tab_currency, community.name())
self.currencies_tabwidget.addTab(tab_currency,
QIcon(":/icons/currency_icon"),
community.name())
self.menu_contacts_list.clear()
for contact in self.app.current_account.contacts:
......@@ -117,6 +120,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.app.export_account(path, self.app.current_account)
def closeEvent(self, event):
if self.app.current_account:
self.app.save_cache(self.app.current_account)
super().closeEvent(event)
......@@ -5,22 +5,23 @@ Created on 5 févr. 2014
'''
import logging
from ucoinpy.documents.peer import BMAEndpoint, Peer
class RootItem(object):
def __init__(self, name):
self.name = name
self.main_node_items = []
self.main_peer_items = []
def appendChild(self, item):
self.main_node_items.append(item)
self.main_peer_items.append(item)
def child(self, row):
return self.main_node_items[row]
return self.main_peer_items[row]
def childCount(self):
return len(self.main_node_items)
return len(self.main_peer_items)
def columnCount(self):
return 1
......@@ -41,7 +42,16 @@ class RootItem(object):
class PeerItem(object):
def __init__(self, main_peer, root_item):
self.main_peer_text = main_peer.pubkey
e = next((e for e in main_peer.endpoints if type(e) is BMAEndpoint))
if e.server:
self.main_peer_text = "{0}:{1}".format(e.server, e.port)
elif e.ipv4:
self.main_peer_text = "{0}:{1}".format(e.ipv4, e.port)
elif e.ipv6:
self.main_peer_text = "{0}:{1}".format(e.ipv6, e.port)
else:
self.main_peer_text = "{0}".format(main_peer.pubkey)
self.root_item = root_item
self.peer_items = []
......
......@@ -5,7 +5,7 @@ Created on 5 févr. 2014
'''
from ucoinpy.api import bma
from ucoinpy.documents.peer import BMAEndpoint
from ucoinpy.documents.peer import BMAEndpoint, Peer
from PyQt5.QtCore import QAbstractItemModel, QModelIndex, Qt
from .peer import PeerItem, RootItem
import logging
......@@ -98,19 +98,16 @@ class PeeringTreeModel(QAbstractItemModel):
def refresh_tree(self):
logging.debug("root : " + self.root_item.data(0))
for peer in self.peers:
logging.debug("Browser peers")
peer_item = PeerItem(peer, self.root_item)
logging.debug(
"main peer : " +
peer.get_text() +
" / " +
peer_item.data(0))
self.root_item.appendChild(peer_item)
try:
e = next((e for e in peer.endpoints if type(e) is BMAEndpoint))
for peer in bma.network.peering.Peers(e.conn_handler()):
peers = bma.network.peering.Peers(e.conn_handler()).get()
for peer_data in peers:
peer = Peer.from_signed_raw("{0}{1}\n".format(peer_data['value']['raw'],
peer_data['value']['signature']))
child_node_item = PeerItem(peer, peer_item)
logging.debug("\t peer : " + peer.pubkey + " / " +
child_node_item.data(0))
peer_item.appendChild(child_node_item)
except e as StopIteration:
except StopIteration as e:
continue
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment