Federated learning is an emerging privacypreserving machine learning paradigm which has attracted great interests from the community of Industrial Internet of Things (IIoT). Blockchain has been recently leveraged in IIoT federated learning to provide data integrity and incentives to attract sufficient client data and computation resources for training. However, there is a lack of systematic architecture design for blockchain-based federated learning systems to support methodical development and tackle the challenge of data heterogeneity in failure detection of IIoT. Also, the current solutions do not consider the incentive mechanism design and scalability issue of blockchain. Therefore, in this paper, we present a platform architecture of blockchain-based federated learning systems for failure detection in IIoT. To address the data heterogeneity issue in IIoT failure detection, we propose a novel centroid distance weighted federated averaging (CDW FedAvg) algorithm taking into account the distance between positive class and negative class of each client dataset. To enable verifiable integrity of client data in a scalable way, each client server periodically creates a Merkle tree in which each leaf node represents a client data record, and stores the tree root on a blockchain. An on-chain incentive mechanism is designed based on the size of client data used in local model training to accurately and timely calculate each client's contribution. A prototype of the proposed architecture is implemented with our industry partner, and evaluated in terms of feasibility, accuracy and performance. The results show that the approach ensures data integrity and has satisfactory detection accuracy and performance.