Whoever wilfully violates the preceding section or wilfully accepts or holds office in violation of article two of chapter six of the second part of the constitution, as amended by article twenty-seven of the amendments thereof, shall forfeit to the commonwealth the compensation from all offices held in violation of said provisions during the time they are so held, to be recovered by the attorney general, upon written complaint made within one year by any citizen.
Mass. Gen. Laws ch. 30, § 22