diff uint256.h @ 153:de492f5bf245 draft

automatically change displayed address whenever it receives anything, added help and -? for daemon command line rpc commands, only relay addr messages to 5 random nodes to save bandwidth, started setting wtx.fFromMe flag, trickle out tx inventory messages to protect privacy -- version 0.2.10
author s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>
date Thu, 10 Jun 2010 23:10:30 +0000 (2010-06-10)
parents 52226e2e4fc3
children c6961d8d9a4f
line wrap: on
line diff
--- a/uint256.h
+++ b/uint256.h
@@ -388,7 +388,6 @@
 //
 // uint160 and uint256 could be implemented as templates, but to keep
 // compile errors and debugging cleaner, they're copy and pasted.
-// It's safe to search and replace 160 with 256 and vice versa.
 //
 
 
@@ -405,6 +404,8 @@
 
     uint160()
     {
+        for (int i = 0; i < WIDTH; i++)
+            pn[i] = 0;
     }
 
     uint160(const basetype& b)
@@ -517,6 +518,8 @@
 
     uint256()
     {
+        for (int i = 0; i < WIDTH; i++)
+            pn[i] = 0;
     }
 
     uint256(const basetype& b)