@startuml activate "Core Component" "Core Component" -> BmaAccess : Request data BmaAccess -> BmaAccess : Request cache ref over BmaAccess Data is obsolete (new block mined since last caching) end ref BmaAccess -> ucoinpy : HTTP GET alt Rollback BmaAccess -> BmaAccess : Find last block number rollbacked ref over BmaAccess If the request is a bma/blockchain/Block, we check if the hash answered is the same as our hash, in which case, we know that the rollback didn't reset blocks before this one. Blocks from this one to the current block are considered obsolete end ref end BmaAccess -> BmaAccess : Update cache data "Core Component" <- BmaAccess : Return data data deactivate "Core Component" @enduml