In VANET, although data sharing among vehicles improves safety and traffic, malicious data providers might share false information to compromise its effectiveness. One typical solution to address this issue is to manage the trustworthiness of data providers by using feedback received from data users quantifying the veracity of the shared data. However, data users might behave maliciously and share untruthful feedback. This paper introduces TrCoin, a blockchain-based trust management system, for VANET which tackles both fake data and untruthful feedback. TrCoin uses an honesty value calculation algorithm to distinguish honest from malicious data users and filters out the feedback shared by the malicious data users. TrCoin then runs a trust value calculation algorithm to compute the trust values of data providers based on the truthful feedback shared by honest data users. Extensive simulations are conducted to demonstrate the effectiveness of TrCoin under various attack scenarios with false data injection and untruthful feedback.