The discontent in the various districts of the company territories exploded in 1857 into the Sepoy war . The simmering discontent in the various districts of the company territories exploded in 1857 into the Sepoy war .