[Webfunds-commits] java/webfunds/sox/value PendingReceipt.java StoreAccountStore.java

Ian Grigg iang@cypherpunks.ai
Wed, 11 Apr 2001 15:38:10 -0400 (AST)


iang        01/04/11 15:38:10

  Modified:    webfunds/sox/value PendingReceipt.java
                        StoreAccountStore.java
  Log:
  diags only

Revision  Changes    Path
1.16      +5 -4      java/webfunds/sox/value/PendingReceipt.java

Index: PendingReceipt.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/value/PendingReceipt.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- PendingReceipt.java	2001/03/24 23:57:23	1.15
+++ PendingReceipt.java	2001/04/11 19:38:09	1.16
@@ -1,5 +1,5 @@
 /*
- * $Id: PendingReceipt.java,v 1.15 2001/03/24 23:57:23 iang Exp $
+ * $Id: PendingReceipt.java,v 1.16 2001/04/11 19:38:09 iang Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -20,7 +20,7 @@
 /**
  *  This class is no good.
  *  This was Serializable, in old SOXWallet, so it may not be
- *  Compatible where serlized classes need to be recovered.
+ *  Compatible where serialized classes need to be recovered.
  */
 public class PendingReceipt
     implements Serializable
@@ -190,8 +190,9 @@
 
     public String toString()
     {
-        return "PR: " + transid + " " + amount + " of " + item + "\n" +
-               "from " + src + " to " + tgt + "\n";
+        return "PR: " + transid + " " + amount + " of " + item.fp() + "\n" +
+               "              from " + src + "\n" +
+               "              to " + tgt + "\n";
     }
 
     public boolean equals(java.lang.Object obj)



1.27      +16 -12    java/webfunds/sox/value/StoreAccountStore.java

Index: StoreAccountStore.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/sox/value/StoreAccountStore.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- StoreAccountStore.java	2001/03/27 01:48:36	1.26
+++ StoreAccountStore.java	2001/04/11 19:38:09	1.27
@@ -1,5 +1,5 @@
 /*
- * $Id: StoreAccountStore.java,v 1.26 2001/03/27 01:48:36 iang Exp $
+ * $Id: StoreAccountStore.java,v 1.27 2001/04/11 19:38:09 iang Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -26,9 +26,12 @@
 {
     static final String ACCOUNTS_NAME = "Accounts";  // a standard name
 
-    
+    protected static final String TAB = "      ";
+    protected static final String fix  = TAB + "storeAc: ";
+
+  
     Store        store;
-    
+  
     /**
      *  Store for accounts.
      *  No IssuerFinder is set in the accounts, caller has to set it.
@@ -37,10 +40,11 @@
     {
         if (store == null)
             throw new IllegalArgumentException("StoreAccountStore store==null");
-        this.store = store;        
+        this.store = store;      
+        debug(fix);
     }
-    
-        
+  
+      
     public Account[] getAllAccounts()
         throws StoreException  // doesn't currently, but should
     {
@@ -59,7 +63,7 @@
         }
         return retval;
     }
-    
+  
     /**
      *  idempotent, saves changes.
      */
@@ -80,7 +84,7 @@
         logmsg("Putting account: " +  key);
         store.put(key, baos.toByteArray());
     }
-    
+  
     public void deleteAccount(Account acct)
         throws StoreException
     {
@@ -94,7 +98,7 @@
             throw new StoreException("Couldn't delete file");
         }
     }
-    
+  
     public Account getAccount(AccountId acct)
         throws StoreException
     {
@@ -123,9 +127,9 @@
                 logmsg("empty " + key + " StoreAccountStore");
                 return null;
             }
-    
+  
             logmsg("converting [] " + data.length + " bytes");
-    
+  
             try {
                 ac = new Account(data);
             } catch (SOXPacketException ex) {
@@ -142,7 +146,7 @@
 
         return ac;
     }
-    
+  
     public boolean isChanged()
     {
         return store.isChanged();