src/main/java/toy/servers/ToyBaseServer_old.java
/**
     * Clear the data of block i from all layers of the algorithm, leaving only its header in the Blockchain.
     * This method is essential to ease the memory bounds of Toy.
     * @param index the block to evacuate
     */
Clear the data of block i from all layers of the algorithm, leaving only its header in the Blockchain.
This method is essential to ease the memory bounds of Toy.
@param index the block to evacuate
Clear the data of block i from all layers of the algorithm leaving only its header in the Blockchain . This method is essential to ease the memory bounds of Toy . @param index the block to evacuate
public void gc(int index)  {
        logger.debug(format("[#%d-C[%d]] clear buffers of [height=%d]", getID(), channel, index));
        Types.Meta key = bc.getBlock(index).getHeader().getM();
        Types.Meta rKey = Types.Meta.newBuilder()
                .setChannel(key.getChannel())
                .setCidSeries(key.getCidSeries())
                .setCid(key.getCid())
                .build();
         wrbServer.clearBuffers(rKey);
        syncRB.clearBuffers(rKey);
        panicRB.clearBuffers(rKey);
        bc.setBlock(index, null);
    }
public void gc ( int index ) { logger . debug ( format ( "[#%d-C[%d]] clear buffers of [height=%d]" , getID ( ) , channel , index ) ) ; Types . Meta key = bc . getBlock ( index ) . getHeader ( ) . getM ( ) ; Types . Meta rKey = Types . Meta . newBuilder ( ) . setChannel ( key . getChannel ( ) ) . setCidSeries ( key . getCidSeries ( ) ) . setCid ( key . getCid ( ) ) . build ( ) ; wrbServer . clearBuffers ( rKey ) ; syncRB . clearBuffers ( rKey ) ; panicRB . clearBuffers ( rKey ) ; bc . setBlock ( index , null ) ; }
Clear the data of block i from all layers of the algorithm, leaving only its header in the Blockchain.
Clear the data of block i from all layers of the algorithm leaving only its header in the Blockchain .