public Coin getBalanceForServer ( Sha256Hash id ) { Coin balance = Coin . ZERO ; lock . lock ( ) ; try { Set < StoredClientChannel > setChannels = mapChannels . get ( id ) ; for ( StoredClientChannel channel : setChannels ) { synchronized ( channel ) { if ( channel . close != null ) continue ; balance = balance . add ( channel . valueToMe ) ; } } return balance ; } finally { lock . unlock ( ) ; } }
Returns the outstanding amount of money sent back to us for all channels to this server added together .